API Reference ============= This page contains a full list of valid Indivo API calls, generated from the code. For a more detailed walkthrough of individual calls, see :doc:`api`. In the access control for some calls, you might see the phrase *full control*. In Indivo, this is defined as follows: .. glossary:: full control A principal is said to be in full control of a record if either: * The principal is the owner of the record * There is a full share between the record and the principal. -------- .. http:post:: /accounts/ Create a new account, and send out initialization emails. :shortname: account_create :accesscontrol: Any admin app. :formparameter primary_secret_p: 0 or 1: Does this account require a primary secret? :formparameter secondary_secret_p: 0 or 1: Does this account require a secondary secret? :formparameter contact_email: A valid email at which to reach the account holder. :formparameter account_id: An identifier for the new account. Must be a valid email address. **REQUIRED** :formparameter full_name: The full name to associate with the account. :returns: :http:statuscode:`200` with information about the new account on success, :http:statuscode:`400` if ``ACCOUNT_ID`` isn't passed or is already used. Example Return Value:: Joe User joeuser@gmail.com 2010-05-04T15:34:23Z 43 0 active 2009-04-03T13:12:12Z -------- .. http:get:: /accounts/search Search for accounts by name or email. :shortname: account_search :accesscontrol: Any admin app. :queryparameter fullname: The full name of the account to search for :queryparameter contact_email: The contact email of the account to search for :returns: :http:statuscode:`200` with information about matching accounts, or :http:statuscode:`400` if no search parameters are passed. Example Return Value:: Joe User joeuser@gmail.com 2010-05-04T15:34:23Z 43 0 active 2009-04-03T13:12:12Z ... -------- .. http:get:: /accounts/{ACCOUNT_EMAIL} Display information about an account. :shortname: account_info :accesscontrol: Any admin app, or the Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200` with information about the account Example Return Value:: Joe User joeuser@gmail.com 2010-05-04T15:34:23Z 43 0 active 2009-04-03T13:12:12Z -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/apps/{PHA_EMAIL}/connect_credentials Get oAuth credentials for an app to run in Connect or SMART REST mode. :shortname: get_connect_credentials :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account to authorize the connect credentials :parameter PHA_EMAIL: The email identifier of the Indivo user app to grant access via the connect credentials :formparameter record_id: The identifier of the Indivo Record to which to grant access via the connect credentials :returns: :http:statuscode:`200` with a set of credentials providing access for the app to the record, via :ref:`Connect-Style Authentication ` and via :ref:`Standard oAuth ` authentication. Additionally, the credentials include a precalculated oAuth Header that the app can use to access the record. Example Return Value:: 1QzyGdx13Da re3Qg4dxaf9 http://your_indivo_instance.org:8000 7qGer7dx4gC 5JpXb0G2g4u OAuth realm="", oauth_version="1.0", oauth_consumer_key="problems%40apps.indivo.org", oauth_signature_method="HMAC-SHA1", oauth_nonce="VNGQuyvdHbGLsFXm2oIL", oauth_timestamp="1334848404", oauth_signature="HHpwLSSCxgRhYfWDw3uLdmjsyMk%3D" 2012-07-04T00:00:00Z .. versionadded:: 2.0.0 -------- .. http:delete:: /accounts/{ACCOUNT_EMAIL}/apps/{PHA_EMAIL}/preferences Delete all app-specific User Preferences for an account. :shortname: delete_user_preferences :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200 Success` Example Return Value:: .. versionadded:: 2.0.0 -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/apps/{PHA_EMAIL}/preferences Get app-specific User Preferences for an account. :shortname: get_user_preferences :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200`, with app-specific user preferences Example Return Value:: Preferences format is defined by the app setting the preferences, and will therefore vary. .. versionadded:: 2.0.0 -------- .. http:put:: /accounts/{ACCOUNT_EMAIL}/apps/{PHA_EMAIL}/preferences Set app-specific User Preferences for an account. :shortname: set_user_preferences :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200 Success` Example Return Value:: .. versionadded:: 2.0.0 -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/authsystems/ Add a new method of authentication to an account. :shortname: account_authsystem_add :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter username: The username for this account :formparameter password: The password for this account :formparameter system: The identifier of the desired authsystem. ``password`` indicates the internal password system. :returns: :http:statuscode:`200 Success`, :http:statuscode:`403` if the indicated auth system doesn't exist, and :http:statuscode:`400` if a system and a username weren't passed, or if the account is already registered with the passed system, or if the username is already taken for the passed authsystem. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/authsystems/password/change Change a account's password. :shortname: account_password_change :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter new: The desired new password. :formparameter old: The existing account password. :returns: :http:statuscode:`200 Success`, :http:statuscode:`403` if the old password didn't validate, or :http:statuscode:`400` if both a new and old password weren't passed. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/authsystems/password/set Force the password of an account to a given value. :shortname: account_password_set :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter password: The new password to set. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if a new password wasn't passed. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/authsystems/password/set-username Force the username of an account to a given value. :shortname: account_username_set :accesscontrol: Any admin app, or the Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter username: The new username to set. :returns: :http:statuscode:`200 Success`, :http:statuscode:`400` if a username wasn't passed. Example Return Value:: -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/check-secrets/{PRIMARY_SECRET} Validate an account's primary and secondary secrets. :shortname: account_check_secrets :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter PRIMARY_SECRET: A confirmation string sent securely to the patient from Indivo :queryparameter secondary_secret: The secondary secret of the account to check. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`403` if validation fails. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/forgot-password Resets an account if the user has forgotten its password. :shortname: account_forgot_password :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode`200` with the account's new secondary secret, or :http:statuscode:`400` if the account hasn't yet been initialized. Example Return Value:: 123456 -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/inbox/ List messages in an account's inbox. :shortname: account_inbox :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :queryparameter status: The account or document status to filter by :queryparameter order_by: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter include_archive: 0 or 1: whether or not to include archived messages in the result set. :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200`, with a list of inbox messages. Example Return Value:: doctor@example.indivo.org 2010-09-04T14:12:12Z 2010-09-04T17:13:24Z your test results are looking good normal ... -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/inbox/ Send a message to an account. :shortname: account_send_message :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter body: The message body. Defaults to ``[no body]``. :formparameter severity: The importance of the message. Options are ``low``, ``medium``, ``high``. Defaults to ``low``. :formparameter body_type: The formatting of the message body. Options are ``plaintext``, ``markdown``. Defaults to ``plaintext``. :formparameter message_id: An external identifier for the message, for idempotency. :formparameter subject: The message subject. Defaults to ``[no subject]``. :returns: :http:statuscode:`200 Success` with XML describing the message, or http:statuscode:`400` if the passed message_id is a duplicate. Also emails account to alert them that a new message has arrived. Example Return Value:: test@indivo.org 2012-07-13T15:59:25.102905Z subj low -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID} Retrieve an individual message from an account's inbox. :shortname: account_inbox_message :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter MESSAGE_ID: The unique identifier of the Indivo Message :returns: :http:statuscode:`200`, with XML describing the message. Example Return Value:: doctor@example.indivo.org 2010-09-04T14:12:12Z 2010-09-04T17:13:24Z 2010-09-04T17:15:24Z your test results are looking good Great results! It seems you'll live forever! normal -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID}/archive Archive a message. :shortname: account_message_archive :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter MESSAGE_ID: The unique identifier of the Indivo Message :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM}/accept Accept a message attachment into the record it corresponds to. :shortname: account_inbox_message_attachment_accept :accesscontrol: The Account owner. :parameter ATTACHMENT_NUM: The 1-indexed number corresponding to the message attachment :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter MESSAGE_ID: The unique external identifier of the Indivo Message :returns: :http:statuscode:`200 Success`, or :http:statuscode:`410` if the attachment has already been saved. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/info-set Set basic information about an account. :shortname: account_info_set :accesscontrol: Any admin app, or the Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter contact_email: A valid email at which to reach the account holder. :formparameter full_name: The full name of the account. :returns: :http:statuscode:`200`, or :http:statuscode:`400` if no parameters are passed in. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/initialize/{PRIMARY_SECRET} Initialize an account, activating it. :shortname: account_initialize :accesscontrol: Any Indivo UI app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :parameter PRIMARY_SECRET: A confirmation string sent securely to the patient from Indivo :formparameter secondary_secret: :returns: :http:statuscode:`200 Success`, :http:statuscode:`403` if the account has already been initialized or if secrets didn't validate, and :http:statuscode:`400` if a secondary secret was required but missing. Example Return Value:: -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/notifications/ List an account's notifications. :shortname: account_notifications :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :queryparameter status: The account or document status to filter by :queryparameter limit: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of the account's notifications. Example Return Value:: labs@apps.indivo.org 2010-09-03T15:12:12Z A new lab result has been delivered to your account ... -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/permissions/ List the carenets that an account has access to. :shortname: account_permissions :accesscontrol: The Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200` with a list of carenets. Example Return Value:: -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/primary-secret Display an account's primary secret. :shortname: account_primary_secret :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200`, with the primary secret. Example Return Value:: 123absxzyasdg13b .. deprecated:: 1.0.0 Avoid sending primary secrets over the wire. Instead, use :http:get:`/accounts/{ACCOUNT_EMAIL}/check-secrets/{PRIMARY_SECRET}`. -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/records/ List all available records for an account. :shortname: record_list :accesscontrol: Any admin app, or the Account owner. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :queryparameter status: The account or document status to filter by :queryparameter order_by: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200`, with a list of records owned or shared with the account. Example Return Value:: ... -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/reset Reset an account to an ``uninitialized`` state. :shortname: account_reset :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:get:: /accounts/{ACCOUNT_EMAIL}/secret Return the secondary secret of an account. :shortname: account_secret :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200`, with the secondary secret. Example Return Value:: 123456 -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/secret-resend Sends an account user their primary secret in case they lost it. :shortname: account_resend_secret :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :returns: :http:statuscode:`200 Success`. Also emails the account with their new secret. Example Return Value:: -------- .. http:post:: /accounts/{ACCOUNT_EMAIL}/set-state Set the state of an account. :shortname: account_set_state :accesscontrol: Any admin app. :parameter ACCOUNT_EMAIL: The email identifier of the Indivo account :formparameter state: The desired state of the account. Options are ``active``, ``disabled``, ``retired``. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`403` if the account has been retired and can no longer change state. Example Return Value:: -------- .. http:get:: /apps/ List all available userapps. :shortname: all_phas :accesscontrol: Any principal in Indivo. :returns: :http:statuscode:`200`, with a list of app manifests as JSON on success. Example Return Value:: [ { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } }, ... other apps ... ] .. versionchanged:: 2.0.0 Apps are now returned as JSON manifests, not XML -------- .. http:get:: /apps/manifests/ List SMART manifests for all available userapps. :shortname: all_manifests :accesscontrol: Any principal in Indivo. :returns: SMART-style manifests for each app. Example Return Value:: [ { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } }, ... other apps ... ] .. versionadded:: 2.0.0 -------- .. http:delete:: /apps/{PHA_EMAIL} Delete a userapp from Indivo. :shortname: pha_delete :accesscontrol: The user app itself. :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:get:: /apps/{PHA_EMAIL} Return a description of a single userapp. :shortname: pha :accesscontrol: Any principal in Indivo. :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200`, with the app's JSON manifest Example Return Value:: { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } } .. versionchanged:: 2.0.0 Apps are now returned as JSON manifests, not XML -------- .. http:get:: /apps/{PHA_EMAIL}/documents/ List app-specific documents. :shortname: app_document_list :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :queryparameter status: The account or document status to filter by :queryparameter order_by: See :ref:`query-operators` :queryparameter type: The Indivo document type to filter by :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with A list of documents, or http:statuscode:`404` if an invalid type was passed in the querystring. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:post:: /apps/{PHA_EMAIL}/documents/ Create an app-specific Indivo document. :shortname: app_document_create :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new document failed validation. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID} Create an app-specific Indivo document with an associated external id. :shortname: app_document_create_or_update_ext :accesscontrol: A user app with an id matching the app email in the URL. :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created or updated document, or :http:statuscode:`400` if the passed content didn't validate. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID}/meta Fetch the metadata of an app-specific document identified by external id. :shortname: app_document_meta_ext :accesscontrol: A user app with an id matching the app email in the URL. :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with metadata describing the specified document, or http:statuscode:`404` if the external_id is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:delete:: /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID} Delete an app-specific document. :shortname: app_document_delete :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: -------- .. http:get:: /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID} Retrive an app-specific document. :shortname: app_specific_document :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the raw content of the document, or :http:statuscode:`404` if the document could not be found. Example Return Value:: -------- .. http:put:: /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID} Create or Overwrite an app-specific Indivo document. :shortname: app_document_create_or_update :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with metadata describing the created or updated document, or :http:statuscode:`400` if the passed content didn't validate. Example Return Value:: 2009-05-04T17:05:33 active false -------- .. http:put:: /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/label Set the label of an app-specific document. :shortname: app_document_label :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The new label for the document :returns: :http:statuscode:`200` with metadata describing the re-labeled document, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/meta Fetch the metadata of an app-specific document. :shortname: app_document_meta :accesscontrol: A user app with an id matching the app email in the URL. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the document metadata, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /apps/{PHA_EMAIL}/manifest Return a SMART manifest for a single userapp. :shortname: app_manifest :accesscontrol: Any principal in Indivo. :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: A SMART-style manifest for the app. Example Return Value:: { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } } .. versionadded:: 2.0.0 -------- .. http:get:: /apps/{PHA_EMAIL}/records/ Return a list of all records that have this pha enabled. :shortname: app_record_list :accesscontrol: Any autonomous user app. :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with a list of records on success. Example Return Value:: ... .. versionadded:: 1.0.0 -------- .. http:post:: /apps/{PHA_EMAIL}/records/{RECORD_ID}/access_token Fetch an access token for an autonomous app to access a record. :shortname: autonomous_access_token :accesscontrol: An autonomous user app with a record on which the app is authorized to run. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with a valid access token for the app bound to the record on success. Example Return Value:: oauth_token=abcd1fw3gasdgh3&oauth_token_secret=jgrlhre4291hfjas&xoauth_indivo_record_id=123 .. versionadded:: 1.0.0 -------- .. http:get:: /capabilities/ SMART Capabilities :shortname: smart_capabilities :accesscontrol: Any principal in Indivo. :returns: JSON formatted SMART capabilities Example Return Value:: { "http://smartplatforms.org/terms#Demographics": { "methods": [ "GET" ] }, "http://smartplatforms.org/terms#Encounter": { "methods": [ "GET" ] }, "http://smartplatforms.org/terms#VitalSigns": { "methods": [ "GET" ] } } .. versionadded:: 2.0.0 -------- .. http:delete:: /carenets/{CARENET_ID} Delete a carenet. :shortname: carenet_delete :accesscontrol: A principal in full control of the carenet's record. :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:get:: /carenets/{CARENET_ID}/accounts/ List the accounts in a carenet. :shortname: carenet_account_list :accesscontrol: A principal in the carenet, in full control of the carenet's record, or any admin app. :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with a list of accounts in the specified carenet. Example Return Value:: ... -------- .. http:post:: /carenets/{CARENET_ID}/accounts/ Add an account to a carenet. :shortname: carenet_account_create :accesscontrol: A principal in full control of the carenet's record. :parameter CARENET_ID: The id string associated with the Indivo carenet :formparameter write: ``true`` or ``false``. Whether this account can write to the carenet. :formparameter account_id: An identifier for the account. Must be a valid email address. :returns: :http:statuscode:`200 Success`, :http:statuscode:`404` if the specified account or carenet don't exist, or :http:statuscode:`400` if an account_id isn't passed. Example Return Value:: -------- .. http:delete:: /carenets/{CARENET_ID}/accounts/{ACCOUNT_ID} Remove an account from a carenet. :shortname: carenet_account_delete :accesscontrol: A principal in full control of the carenet's record. :parameter ACCOUNT_ID: The email identifier of the Indivo account :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if either the passed account or the passed carenet doesn't exist. Example Return Value:: -------- .. http:get:: /carenets/{CARENET_ID}/accounts/{ACCOUNT_ID}/permissions List the permissions of an account within a carenet. :shortname: carenet_account_permissions :accesscontrol: A user app with access to the carenet and proxying the account, a principal in full control of the carenet's record, or any admin app. :parameter ACCOUNT_ID: The email identifier of the Indivo account :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with a list of document types that the account can access within a carenet. Currently always returns all document types. Example Return Value:: -------- .. http:get:: /carenets/{CARENET_ID}/apps/ List Apps within a given carenet. :shortname: carenet_apps_list :accesscontrol: A principal in the carenet, in full control of the carenet's record, or any admin app. :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with manifests for the apps on success. Example Return Value:: [ { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } }, ... other apps ... ] .. versionchanged:: 2.0.0 Apps are now returned as JSON manifests, not XML -------- .. http:delete:: /carenets/{CARENET_ID}/apps/{PHA_EMAIL} Remove an app from a given carenet. :shortname: carenet_apps_delete :accesscontrol: A principal in full control of the carenet's record. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:put:: /carenets/{CARENET_ID}/apps/{PHA_EMAIL} Add an app to a carenet :shortname: carenet_apps_create :accesscontrol: A principal in full control of the carenet's record. :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if the passed PHA is autonomous (autonomous apps can't be scoped to carenets). Example Return Value:: -------- .. http:get:: /carenets/{CARENET_ID}/apps/{PHA_EMAIL}/permissions Retrieve the permissions for an app within a carenet. NOT IMPLEMENTED. :shortname: carenet_app_permissions :accesscontrol: Nobody :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200`. This call is unimplemented, and has no effect. Example Return Value:: .. todo:: The API Call 'GET /carenets/{0}/apps/{1}/permissions' is not yet implemented. -------- .. http:get:: /carenets/{CARENET_ID}/demographics Read demographics from a carenet. :shortname: read_demographics_carenet :accesscontrol: A user app with access to the carenet or the entire carenet's record, an account in the carenet or in control of the record, or any admin app. :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter response_format: one of `application/rdf+xml` (SMART RDF/XML), `application/json` (:ref:`sdmj`), or `application/xml` (:ref:`sdmx`). Default is `application/rdf+xml` :returns: :http:statuscode:`200` with demographics formatted in the requested ``response_format`` (default `application/rdf+xml`) on success, :http:statuscode:`404` when no demographics found, and :http:statuscode:`400` if response_format is invalid Example Return Value:: application/rdf+xml: William Robinson 800-870-3011 http://indivo.org/records/96ff9eb2-3b18-4a0e-9df8-5a731b96d5d6 Indivo Record Indivo Record 96ff9eb2-3b18-4a0e-9df8-5a731b96d5d6 800-870-3011 william.robinson@example.com 1965-08-09 male EN 23 Church Rd USA OK Bixby 74008 application/xml: 1965-08-09 william.robinson@example.com male EN Robinson William h True 800-870-3011 OK USA 74008 Bixby 23 Church Rd h True 800-870-3011 application/json: [ { "__modelname__": "Demographics", "__documentid__": "44190967-cbaa-43a7-a98c-9f97f094ef2b", "name_given": "Robinson", "name_family": "William", "name_prefix": null, "name_suffix": null, "gender": "male", "race": null, "ethnicity": null, "bday": "1965-08-09", "email": "william.robinson@example.com", "preferred_language": "EN", "tel_1_type": "h", "tel_1_number": "800-870-3011", "tel_1_preferred_p": true, "tel_2_type": "h", "tel_2_number": "800-870-3011", "tel_2_preferred_p": true, "adr_street": "23 Church Rd", "adr_city": "Bixby", "adr_postalcode": "74008", "adr_region": "OK", "adr_country": "USA" } ] .. versionadded:: 2.0.0 -------- .. http:get:: /carenets/{CARENET_ID}/documents/ List documents from a given carenet. :shortname: carenet_document_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter type: The Indivo document type to filter by :returns: :http:statuscode:`200` with a document list on success, :http:statuscode:`404` if *type* doesn't exist. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:get:: /carenets/{CARENET_ID}/documents/{DOCUMENT_ID} Return a document from a carenet. :shortname: carenet_document :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter DOCUMENT_ID: The unique identifier of the Indivo document :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with the document content on success, :http:statuscode:`404` if document_id is invalid or if the document is not shared in the carenet. Example Return Value:: That's my content -------- .. http:get:: /carenets/{CARENET_ID}/documents/{DOCUMENT_ID}/meta Fetch the metadata of a record-specific document via a carenet. :shortname: carenet_document_meta :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter DOCUMENT_ID: The unique identifier of the Indivo document :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with the document's metadata, or :http:statuscode:`404` if ``document_id`` doesn't identify an existing document in the carenet. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /carenets/{CARENET_ID}/record Get basic information about the record to which a carenet belongs. :shortname: carenet_record :accesscontrol: A principal in the carenet, in full control of the carenet's record, or any admin app. :parameter CARENET_ID: The id string associated with the Indivo carenet :returns: :http:statuscode:`200` with XML describing the record. Example Return Value:: -------- .. http:post:: /carenets/{CARENET_ID}/rename Change a carenet's name. :shortname: carenet_rename :accesscontrol: A principal in full control of the carenet's record. :parameter CARENET_ID: The id string associated with the Indivo carenet :formparameter name: The new name for the carenet. :returns: :http:statuscode:`200` with XML describing the renamed carenet on success, :http:statuscode:`400` if ``name`` wasn't passed or if a carenet named ``name`` already exists on this record. Example Return Value:: -------- .. http:get:: /carenets/{CARENET_ID}/reports/minimal/equipment/ List the equipment data for a given carenet. :shortname: carenet_equipment_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of equipment, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2009-02-05 2010-06-12 cardiac Pacemaker Acme Medical Devices 167-ABC-23 it works blah blah blah ... -------- .. http:get:: /carenets/{CARENET_ID}/reports/minimal/measurements/{LAB_CODE}/ List the measurement data for a given carenet. :shortname: carenet_measurement_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter CARENET_ID: The id string associated with the Indivo carenet :parameter LAB_CODE: The identifier corresponding to the measurement being made. :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of measurements, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false ... -------- .. http:get:: /carenets/{CARENET_ID}/reports/minimal/procedures/ List the procedure data for a given carenet. :shortname: carenet_procedure_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of procedures, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2009-05-16T12:00:00 Appendectomy Kenneth Mandl Children's Hospital Boston ... -------- .. http:get:: /carenets/{CARENET_ID}/reports/minimal/simple-clinical-notes/ List the simple_clinical_notes data for a given carenet. :shortname: carenet_simple_clinical_notes_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of notes, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2010-02-02T12:00:00Z 2010-02-03T13:12:00Z Acute Care Longfellow Medical Hematology/Oncology 2010-02-03T13:12:00Z Kenneth Mandl Children's Hospital Boston Isaac Kohane Children's Hospital Boston stomach ache Patient presents with ... ... -------- .. http:get:: /carenets/{CARENET_ID}/reports/{DATA_MODEL}/ List the Model data for a given carenet. :shortname: carenet_generic_list :accesscontrol: A user app with access to the carenet or the entire carenet's record, or an account in the carenet or in control of the record. :parameter DATA_MODEL: The name of the data model to report on :parameter CARENET_ID: The id string associated with the Indivo carenet :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :queryparameter response_format: See :ref:`response_formats` :returns: :http:statuscode:`200` with a list of DATA_MODELs, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: SDMX Example: { "__modelname__": "TestMedication", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "name": "ibuprofen", "date_started": "2010-10-01T00:00:00Z", "date_stopped": "2010-10-31T00:00:00Z", "brand_name": "Advil", "prescription": { "__modelname__": "TestPrescription", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "prescribed_by_name": "Kenneth D. Mandl", "prescribed_by_institution": "Children's Hospital Boston", "prescribed_on": "2010-09-30T00:00:00Z", "prescribed_stop_on": "2010-10-31T00:00:00Z" }, "fills": [ { "__modelname__": "TestFill", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "date_filled": "2010-10-01T00:00:00Z", "supply_days": "15", "filled_at_name": "CVS" }, { "__modelname__": "TestFill", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "date_filled": "2010-10-16T00:00:00Z", "supply_days": "15", "filled_at_name": "CVS" } ] } SDMX Example: 2010-10-01T00:00:00Z ibuprofen Advil 2010-10-31T00:00:00Z Kenneth D. Mandl Children's Hospital Boston 2010-09-30T00:00:00Z 2010-10-31T00:00:00Z 2010-10-01T00:00:00Z 15 CVS 2010-10-16T00:00:00Z 15 CVS -------- .. http:get:: /codes/systems/ List available codingsystems. NOT IMPLEMENTED. :shortname: coding_systems_list :accesscontrol: Anybody :returns: :http:statuscode:`500`, as the system cannot process the call. Example Return Value:: [{"short_name": "umls-snomed", "name": "UMLS SNOMED", "description" : "..."}, {..}, {..}] .. todo:: The API Call 'GET /codes/systems/' is not yet implemented. -------- .. http:get:: /codes/systems/{SYSTEM_SHORT_NAME}/query Query a codingsystem for a value. :shortname: coding_system_query :accesscontrol: Anybody :parameter SYSTEM_SHORT_NAME: :queryparameter q: The query string to search for :returns: :http:statuscode:`200` with JSON describing codingsystems entries that matched *q*, or :http:statuscode:`404` if ``SYSTEM_SHORT_NAME`` is invalid. Example Return Value:: [{"abbreviation": null, "code": "38341003", "consumer_value": null, "umls_code": "C0020538", "full_value": "Hypertensive disorder, systemic arterial (disorder)"}, {"abbreviation": null, "code": "55822004", "consumer_value": null, "umls_code": "C0020473", "full_value": "Hyperlipidemia (disorder)"}] -------- .. http:post:: /oauth/access_token Exchange a request token for a valid access token. :shortname: exchange_token :accesscontrol: A request signed by a RequestToken. :returns: :http:statuscode:`200` with an access token, or :http:statuscode:`403` if the request token didn't validate. Example Return Value:: oauth_token=abcd1fw3gasdgh3&oauth_token_secret=jgrlhre4291hfjas&xoauth_indivo_record_id=123 -------- .. http:post:: /oauth/internal/request_tokens/{REQTOKEN_ID}/approve Indicate a user's consent to bind an app to a record or carenet. :shortname: request_token_approve :accesscontrol: A principal in the carenet to which the request token is restricted (if the token is restricted), or a principal with full control over the record (if the token is not restricted). :parameter REQTOKEN_ID: :formparameter record_id: The record to bind to. Either *record_id* or *carenet_id* is required. :formparameter carenet_id: The carenet to bind to. Either *record_id* or *carenet_id* is required. :returns: :http:statuscode:`200` with a redirect url to the app on success, :http:statuscode:`403` if *record_id*/*carenet_id* don't match *reqtoken*. Example Return Value:: location=http%3A%2F%2Fapps.indivo.org%2Fproblems%2Fafter_auth%3Foauth_token%3Dabc123%26oauth_verifier%3Dabc123 (which is the urlencoded form of: http://apps.indivo.org/problems/after_auth?oauth_token=abc123&oauth_verifier=abc123 ) -------- .. http:post:: /oauth/internal/request_tokens/{REQTOKEN_ID}/claim Claim a request token on behalf of an account. :shortname: request_token_claim :accesscontrol: Any Account. :parameter REQTOKEN_ID: :returns: :http:statuscode:`200` with the email of the claiming principal, or :http:statuscode:`403` if the token has already been claimed. Example Return Value:: joeuser@indivo.org -------- .. http:get:: /oauth/internal/request_tokens/{REQTOKEN_ID}/info Get information about a request token. :shortname: request_token_info :accesscontrol: Any Account. :parameter REQTOKEN_ID: :returns: :http:statuscode:`200` with information about the token. Example Return Value:: new Problem List Managing your list of problems false true true -------- .. http:post:: /oauth/internal/session_create Authenticate a user and register a web session for them. :shortname: session_create :accesscontrol: Any Indivo UI app. :formparameter username: The username of the user to authenticate. :formparameter password: The password to use with *username* against the internal password auth system. EITHER *password* or *system* is **Required**. :formparameter system: An external auth system to authenticate the user with. EITHER *password* or *system* is **Required**. :returns: :http:statuscode:`200` with a valid session token, or :http:statuscode:`403` if the passed credentials were invalid. Example Return Value:: oauth_token=XYZ&oauth_token_secret=ABC&account_id=joeuser%40indivo.org -------- .. http:get:: /oauth/internal/surl-verify Verify a signed URL. :shortname: surl_verify :accesscontrol: Any Account. :queryparameter surl_sig: The computed signature (base-64 encoded sha1) of the url. :queryparameter surl_timestamp: when the url was generated. Must be within the past hour. :queryparameter surl_token: The access token used to sign the url. :returns: :http:statuscode:`200` with XML describing whether the surl validated. Example Return Value:: If the surl validated: ok If the surl was too old: old If the surl's signature was invalid: mismatch -------- .. http:post:: /oauth/request_token Get a new request token, bound to a record or carenet if desired. :shortname: request_token :accesscontrol: Any user app. :formparameter indivo_record_id: The record to which to bind the request token. EITHER *indivo_record_id* or *indivo_carenet_id* is **REQUIRED**. :formparameter indivo_carenet_id: The carenet to which to bind the request token. EITHER *indivo_record_id* or *indivo_carenet_id* is **REQUIRED**. :returns: :http:statuscode:`200` with the request token on success, :http:statuscode:`403` if the oauth signature on the request of missing or faulty. Example Return Value:: oauth_token=abcd1fw3gasdgh3&oauth_token_secret=jgrlhre4291hfjas&xoauth_indivo_record_id=123 -------- .. http:get:: /ontology Fetch the SMART ontology as RDF/XML. :shortname: smart_ontology :accesscontrol: Any principal in Indivo. :returns: An OWL file describing the SMART ontology. Example Return Value:: see http://sandbox-api.smartplatforms.org/ontology .. versionadded:: 2.0.0 -------- .. http:post:: /records/ Create a new record. :shortname: record_create :accesscontrol: Any admin app. :rawdata: A valid Indivo Demographics Document (see :doc:`/schemas/demographics-schema`). :returns: :http:statuscode:`200` with information about the record on success, :http:statuscode:`400` if the demographics XML was empty or invalid. Example Return Value:: -------- .. http:put:: /records/external/{PRINCIPAL_EMAIL}/{EXTERNAL_ID} Create a new record with an associated external id. :shortname: record_create_ext :accesscontrol: An admin app with an id matching the principal_email in the URL. :parameter PRINCIPAL_EMAIL: The email with which to scope an external id. :parameter EXTERNAL_ID: The external identifier of the desired resource :rawdata: A valid Indivo Demographics Document (see :doc:`/schemas/demographics-schema`). :returns: :http:statuscode:`200` with information about the record on success, :http:statuscode:`400` if the demographics XML was empty or invalid. Example Return Value:: -------- .. http:get:: /records/search Search for records by label (usually the same as full name). :shortname: record_search :accesscontrol: Any admin app. :queryparameter label: A search string to match against record labels. :returns: :http:statuscode:`200` with a list of matching records on success, :http:statuscode:`400` if no query parameters were passed. Example Return Value:: ... .. versionadded:: 1.0.1 -------- .. http:get:: /records/{RECORD_ID} Get information about an individual record. :shortname: record :accesscontrol: A principal in full control of the record, any admin app, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200` with information about the record. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/allergies/ SMART allergy list, serialized as RDF/XML. :shortname: smart_allergies :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :returns: SMART RDF describing the record's allergies and allergy exclusions Example Return Value:: skin rash 271807003 http://purl.bioontology.org/ontology/SNOMEDCT/ food allergy drug allergy mild food allergy 414285001 http://purl.bioontology.org/ontology/SNOMEDCT/ anaphylaxis severe drug allergy 416098002 http://purl.bioontology.org/ontology/SNOMEDCT/ skin rash anaphylaxis 39579001 http://purl.bioontology.org/ontology/SNOMEDCT/ mild 255604002 http://purl.bioontology.org/ontology/SNOMEDCT/ peanut sulfonamide antibacterial N0000175503 http://purl.bioontology.org/ontology/NDFRT/ sulfonamide antibacterial peanut QE1QX6B99R http://fda.gov/UNII/ severe 24484000 http://purl.bioontology.org/ontology/SNOMEDCT/ .. versionadded:: 2.0.0 -------- .. http:get:: /records/{RECORD_ID}/allergies/{MODEL_ID} Retrieve a specific instance of a SMART Allergy/AllergyExclusion. :shortname: smart_allergies_instance :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter MODEL_ID: The id of the Allergy/AllergyExclusion :returns: SMART RDF describing the AllergyAllergyExclusion Example Return Value:: Sulfonamide Antibacterial 416098002 Drug allergy http://purl.bioontology.org/ontology/SNOMEDCT/ 24484000 Severe http://purl.bioontology.org/ontology/SNOMEDCT/ 39579001 Anaphylaxis http://purl.bioontology.org/ontology/SNOMEDCT/ Anaphylaxis Severe Drug allergy N0000175503 Sulfonamide Antibacterial http://purl.bioontology.org/ontology/NDFRT/ .. versionadded:: 2.1.0 -------- .. http:get:: /records/{RECORD_ID}/apps/ List userapps bound to a given record. :shortname: record_phas :accesscontrol: A principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter type: A namespaced document type. If specified, only apps which explicitly declare themselves as supporting that document type will be returned. :returns: :http:statuscode:`200` with a list of JSON manifests for the userapps. Example Return Value:: [ { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } }, ... other apps ... ] .. versionchanged:: 2.0.0 Apps are now returned as JSON manifests, not XML -------- .. http:delete:: /records/{RECORD_ID}/apps/{PHA_EMAIL} Remove a userapp from a record. :shortname: pha_record_delete :accesscontrol: Any admin app, or a principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200 Success`. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/apps/{PHA_EMAIL} Get information about a given userapp bound to a record. :shortname: record_pha :accesscontrol: A principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with a JSON manifest for the app, or :http:statuscode:`404` if the app isn't bound to the record. Example Return Value:: { "name" : "SMART Problems", "description" : "Display problems in a table view", "author" : "Josh Mandel, Children's Hospital Boston", "id" : "problem-list@apps.smartplatforms.org", "version" : ".1a", "mode" : "ui", "scope": "record", "index" : "http://fda.gping.org:8012/framework/problem_list/index.html", "icon" : "http://fda.gping.org:8012/framework/problem_list/icon.png", "requires" : { "http://smartplatforms.org/terms#Problem": { "methods": ["GET"] } } } .. versionchanged:: 2.0.0 Apps are now returned as JSON manifests, not XML -------- .. http:put:: /records/{RECORD_ID}/apps/{PHA_EMAIL} Enable a userapp for a record. :shortname: record_pha_enable :accesscontrol: Any admin app, or a principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` on success, :http:statuscode:`404` if either the specified record or the specified app doesn't exist. Example Return Value:: .. versionadded:: 1.0.0 -------- .. http:get:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/ List record-app-specific documents. :shortname: record_app_document_list :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :queryparameter status: The account or document status to filter by :queryparameter order_by: See :ref:`query-operators` :queryparameter type: The Indivo document type to filter by :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of documents, or :http:statuscode:`404` if an invalid type was passed in the querystring. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:post:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/ Create a record-app-specific Indivo document. :shortname: record_app_document_create :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new document failed validation. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:post:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID} Create or Overwrite a record-app-specific Indivo document with an associated external id. :shortname: record_app_document_create_or_update_ext :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create/update. :returns: :http:statuscode:`200` with metadata describing the created or updated document, or :http:statuscode:`400` if the passed content didn't validate. Example Return Value:: 2009-05-04T17:05:33 active false -------- .. http:put:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID} Create or Overwrite a record-app-specific Indivo document with an associated external id. :shortname: record_app_document_create_or_update_ext :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create/update. :returns: :http:statuscode:`200` with metadata describing the created or updated document, or :http:statuscode:`400` if the passed content didn't validate. Example Return Value:: 2009-05-04T17:05:33 active false -------- .. http:get:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID}/meta Fetch the metadata of a record-app-specific document identified by external id. :shortname: record_app_document_meta_ext :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with metadata describing the specified document, or http:statuscode:`404` if the external_id is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:delete:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID} Delete a record-app-specific document. :shortname: record_app_document_delete :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID} Retrieve a record-app-specific document. :shortname: record_app_specific_document :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the raw content of the document, or :http:statuscode:`404` if the document could not be found. Example Return Value:: -------- .. http:put:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/label Set the label of a record-app-specific document. :shortname: record_app_document_label :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The new label for the document :returns: :http:statuscode:`200` with metadata describing the re-labeled document, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/meta Fetch the metadata of a record-app-specific document. :shortname: record_app_document_meta :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the document metadata, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:post:: /records/{RECORD_ID}/apps/{PHA_EMAIL}/setup Bind an app to a record without user authorization. :shortname: record_pha_setup :accesscontrol: Any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: Raw content that will be used as a setup document for the record. **OPTIONAL**. :returns: :http:statuscode:`200` with a valid access token for the newly set up app. Example Return Value:: oauth_token=abcd1fw3gasdgh3&oauth_token_secret=jgrlhre4291hfjas&xoauth_indivo_record_id=123 -------- .. http:get:: /records/{RECORD_ID}/audits/ Return audits of calls touching *record*. :shortname: audit_record_view :accesscontrol: A principal in full control of the record, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter limit: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200`, with a list of Audit Reports. Example Return Value:: ... .. deprecated:: 0.9.3 Use :http:get:`/records/{RECORD_ID}/audits/query/` instead. -------- .. http:get:: /records/{RECORD_ID}/audits/documents/{DOCUMENT_ID}/ Return audits of calls touching *record* and *document_id*. :shortname: audit_document_view :accesscontrol: A principal in full control of the record, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :queryparameter limit: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200`, with a list of Audit Reports. Example Return Value:: ... .. deprecated:: 0.9.3 Use :http:get:`/records/{RECORD_ID}/audits/query/` instead. -------- .. http:get:: /records/{RECORD_ID}/audits/documents/{DOCUMENT_ID}/functions/{FUNCTION_NAME}/ Return audits of calls to *function_name* touching *record* and *document_id*. :shortname: audit_function_view :accesscontrol: A principal in full control of the record, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :parameter FUNCTION_NAME: The internal Indivo function name called by the API request :queryparameter limit: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200`, with a list of Audit Reports. Example Return Value:: ... .. deprecated:: 0.9.3 Use :http:get:`/records/{RECORD_ID}/audits/query/` instead. -------- .. http:get:: /records/{RECORD_ID}/audits/query/ Select Audit Objects via the Query API Interface. :shortname: audit_query :accesscontrol: A principal in full control of the record, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`audit-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of audit records, or :http:statuscode:`400` if any of the arguments to the query interface are invalid. Example Return Value:: ... .. versionadded:: 0.9.3 -------- .. http:get:: /records/{RECORD_ID}/autoshare/bytype/ For a single record, list all carenets that a given doctype is autoshared with. :shortname: autoshare_list :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter type: The document schema type to check autoshares for. **REQUIRED**. :returns: :http:statuscode:`200` with a list of carenets, or :http:statuscode:`404` if the passed document type is invalid. Example Return Value:: ... -------- .. http:get:: /records/{RECORD_ID}/autoshare/bytype/all For a single record, list all doctypes autoshared into carenets. :shortname: autoshare_list_bytype_all :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200` with a list of doctypes and their shared carenets. Example Return Value:: ... ... -------- .. http:post:: /records/{RECORD_ID}/autoshare/carenets/{CARENET_ID}/bytype/set Automatically share all documents of a certain type into a carenet. :shortname: autoshare_create :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter CARENET_ID: The id string associated with the Indivo carenet :formparameter type: the document schema type to create an autoshare for :returns: :http:statuscode:`200`, or :http:statuscode:`404` if the passed document type doesn't exist. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/autoshare/carenets/{CARENET_ID}/bytype/unset Remove an autoshare from a carenet. :shortname: autoshare_delete :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter CARENET_ID: The id string associated with the Indivo carenet :formparameter type: the document schema type to remove an autoshare for :returns: :http:statuscode:`200`, or :http:statuscode:`404` if the passed document type doesn't exist. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/carenets/ List all carenets for a record. :shortname: carenet_list :accesscontrol: A principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200`, with a list of carenets. Example Return Value:: ... -------- .. http:post:: /records/{RECORD_ID}/carenets/ Create a new carenet for a record. :shortname: carenet_create :accesscontrol: A principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :formparameter name: The label for the new carenet. :returns: :http:statuscode:`200` with a description of the new carenet, or :http:statuscode:`400` if the name of the carenet wasn't passed or already exists. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/demographics Read demographics from a record. :shortname: read_demographics :accesscontrol: A user app with access to the record, a principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter response_format: one of `application/rdf+xml` (SMART RDF/XML), `application/json` (:ref:`sdmj`), or `application/xml` (:ref:`sdmx`). Default is `application/rdf+xml` :returns: :http:statuscode:`200` with demographics formatted in the requested ``response_format`` (default `application/rdf+xml`) on success, :http:statuscode:`404` when no demographics found, and :http:statuscode:`400` if response_format is invalid Example Return Value:: application/rdf+xml: William Robinson 800-870-3011 http://indivo.org/records/96ff9eb2-3b18-4a0e-9df8-5a731b96d5d6 Indivo Record Indivo Record 96ff9eb2-3b18-4a0e-9df8-5a731b96d5d6 800-870-3011 william.robinson@example.com 1965-08-09 male EN 23 Church Rd USA OK Bixby 74008 application/xml: 1965-08-09 william.robinson@example.com male EN Robinson William h True 800-870-3011 OK USA 74008 Bixby 23 Church Rd h True 800-870-3011 application/json: [ { "__modelname__": "Demographics", "__documentid__": "44190967-cbaa-43a7-a98c-9f97f094ef2b", "name_given": "Robinson", "name_family": "William", "name_prefix": null, "name_suffix": null, "gender": "male", "race": null, "ethnicity": null, "bday": "1965-08-09", "email": "william.robinson@example.com", "preferred_language": "EN", "tel_1_type": "h", "tel_1_number": "800-870-3011", "tel_1_preferred_p": true, "tel_2_type": "h", "tel_2_number": "800-870-3011", "tel_2_preferred_p": true, "adr_street": "23 Church Rd", "adr_city": "Bixby", "adr_postalcode": "74008", "adr_region": "OK", "adr_country": "USA" } ] .. versionadded:: 2.0.0 -------- .. http:put:: /records/{RECORD_ID}/demographics Create or update demographics on a record. :shortname: set_demographics :accesscontrol: A user app with access to the record, a principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200` with metadata on the updated document, or :http:statuscode:`400` if the new content didn't validate Example Return Value:: 2009-05-04T17:05:33 Steve Zabak active false .. versionadded:: 2.0.0 -------- .. http:delete:: /records/{RECORD_ID}/documents/ Delete all documents associated with a record. :shortname: documents_delete :accesscontrol: Nobody :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200 Success` Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/documents/ List record-specific documents. :shortname: record_document_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter status: The account or document status to filter by :queryparameter order_by: See :ref:`query-operators` :queryparameter type: The Indivo document type to filter by :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of documents, or :http:statuscode:`404` if an invalid type was passed in the querystring. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:post:: /records/{RECORD_ID}/documents/ Create a record-specific Indivo Document. :shortname: document_create :accesscontrol: A user app with access to the record, a principal in full control of the record, or the admin app that created the record. :parameter RECORD_ID: The id string associated with the Indivo record :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new document failed validation. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID} Create a record-specific Indivo Document with an associated external id. :shortname: document_create_by_ext_id :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new document failed validation, or if the external id was taken. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID}/label Set the label of a record-specific document, specified by external id. :shortname: record_document_label_ext :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :rawdata: The new label for the document :returns: :http:statuscode:`200` with metadata describing the re-labeled document, or :http:statuscode:`404` if ``EXTERNAL_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID}/meta Fetch the metadata of a record-specific document identified by external id. :shortname: record_document_meta_ext :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :returns: :http:statuscode:`200` with the document metadata, or :http:statuscode:`404` if ``EXTERNAL_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID_0}/rels/{REL}/{DOCUMENT_ID_1} Create a new relationship between two existing documents. :shortname: document_rels :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID_1: The id of the document that is the subject of the relationship, i.e. DOCUMENT_ID_1 *annotates* DOCUMENT_ID_0 :parameter DOCUMENT_ID_0: The id of the document that is the object of the relationship, i.e. DOCUMENT_ID_0 *is annotated by* DOCUMENT_ID_1 :parameter REL: The type of relationship between the documents, i.e. ``annotation``, ``interpretation`` :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID_0``, ``DOCUMENT_ID_1``, or ``REL`` don't exist. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID} Retrieve a record-specific document. :shortname: record_specific_document :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the raw content of the document, or :http:statuscode:`404` if the document could not be found. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/ List all the carenets into which a document has been shared. :shortname: document_carenets :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with a list of carenets. Example Return Value:: ... -------- .. http:delete:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/{CARENET_ID} Unshare a document from a given carenet. :shortname: carenet_document_delete :accesscontrol: A principal in full control of the carenet's record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter CARENET_ID: The id string associated with the Indivo carenet :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid or if either the passed carenet or document do not belong to the passed record. Example Return Value:: -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/{CARENET_ID} Place a document into a given carenet. :shortname: carenet_document_placement :accesscontrol: A principal in full control of the carenet's record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter CARENET_ID: The id string associated with the Indivo carenet :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid or nevershared. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/{CARENET_ID}/autoshare-revert Revert the document-sharing of a document in a carent to whatever rules are specified by autoshares. NOT IMPLEMENTED. :shortname: autoshare_revert :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter CARENET_ID: The id string associated with the Indivo carenet :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`. Example Return Value:: .. todo:: The API Call 'POST /records/{0}/documents/{1}/carenets/{2}/autoshare-revert' is not yet implemented. -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/label Set the label of a record-specific document. :shortname: record_document_label :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The new label for the document :returns: :http:statuscode:`200` with metadata describing the re-labeled document, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/meta Fetch the metadata of a record-specific document. :shortname: record_document_meta :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with the document metadata, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/meta Set metadata fields on a document. NOT IMPLEMENTED. :shortname: update_document_meta :accesscontrol: Nobody :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`. Example Return Value:: .. todo:: The API Call 'PUT /records/{0}/documents/{1}/meta' is not yet implemented. -------- .. http:delete:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/nevershare Remove the nevershare flag from a document. :shortname: document_remove_nevershare :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/nevershare Flag a document to never be shared, anywhere. :shortname: document_set_nevershare :accesscontrol: A principal in full control of the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/rels/{REL}/ Get all documents related to the passed document_id by a relation of the passed relation-type. :shortname: get_documents_by_rel :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter REL: The type of relationship between the documents, i.e. ``annotation``, ``interpretation`` :parameter DOCUMENT_ID: The unique identifier of the Indivo document :queryparameter status: The account or document status to filter by. :queryparameter limit: See :ref:`query-operators`. **CURRENTLY UNIMPLEMENTED**. :queryparameter order_by: See :ref:`query-operators`. **CURRENTLY UNIMPLEMENTED**. :queryparameter offset: See :ref:`query-operators`. **CURRENTLY UNIMPLEMENTED** :returns: :http:statuscode:`200` with a list of related documents, or :http:statuscode:`400` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:post:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/rels/{REL}/ Create a document and relate it to an existing document. :shortname: document_create_by_rel :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter REL: The type of relationship between the documents, i.e. ``annotation``, ``interpretation`` :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new content was invalid, or :http:statuscode:`404` if ``DOCUMENT_ID`` or ``REL`` are invalid. Example Return Value:: 2012-07-10T14:58:36.805563Z Bob Loblaw active false -------- .. http:post:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/rels/{REL}/external/{PHA_EMAIL}/{EXTERNAL_ID} Create a document, assign it an external id, and relate it to an existing document. :shortname: document_create_by_rel_with_ext_id :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter REL: The type of relationship between the documents, i.e. ``annotation``, ``interpretation`` :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with the metadata of the created document, or :http:statuscode:`400` if the new content was invalid, or :http:statuscode:`404` if ``DOCUMENT_ID`` or ``REL`` are invalid. Example Return Value:: 2012-07-10T14:58:36.805563Z Bob Loblaw active false -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/rels/{REL}/external/{PHA_EMAIL}/{EXTERNAL_ID} Create a document, assign it an external id, and relate it to an existing document. :shortname: document_create_by_rel_with_ext_id :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter REL: The type of relationship between the documents, i.e. ``annotation``, ``interpretation`` :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200 Success`, :http:statuscode:`400` if the new content was invalid, or :http:statuscode:`404` if ``DOCUMENT_ID`` or ``REL`` are invalid. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/replace Create a new version of a record-specific document. :shortname: document_version :accesscontrol: A user app with access to the record, a principal in full control of the record, or the admin app that created the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with metadata on the new document, :http:statuscode:`400` if the old document has already been replaced by a newer version, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid or if the new content is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:put:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/replace/external/{PHA_EMAIL}/{EXTERNAL_ID} Create a new version of a record-specific document and assign it an external id. :shortname: document_version_by_ext_id :accesscontrol: A user app with access to the record, with an id matching the app email in the URL. :parameter RECORD_ID: The id string associated with the Indivo record :parameter EXTERNAL_ID: The external identifier of the desired resource :parameter PHA_EMAIL: The email identifier of the Indivo user app :parameter DOCUMENT_ID: The unique identifier of the Indivo document :rawdata: The raw content of the document to create. :returns: :http:statuscode:`200` with metadata on the new document, :http:statuscode:`400` if the old document has already been replaced by a newer version, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid or if the new content is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false -------- .. http:post:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/set-status Set the status of a record-specific document. :shortname: document_set_status :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :formparameter status: The new status for the document. Options are ``active``, ``void``, ``archived``. :formparameter reason: The reason for the status change. :returns: :http:statuscode:`200 Success`, :http:statuscode:`400` if *status* or *reason* are missing, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/status-history List all changes to a document's status over time. :shortname: document_status_history :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :returns: :http:statuscode:`200` with a the document's status history, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: no longer relevant ... -------- .. http:get:: /records/{RECORD_ID}/documents/{DOCUMENT_ID}/versions/ Retrieve the versions of a document. :shortname: document_versions :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DOCUMENT_ID: The unique identifier of the Indivo document :queryparameter status: The account or document status to filter by. :queryparameter limit: See :ref:`query-operators`. :queryparameter order_by: See :ref:`query-operators`. :queryparameter offset: See :ref:`query-operators`. :returns: :http:statuscode:`200` with a list of document versions, or :http:statuscode:`404` if ``DOCUMENT_ID`` is invalid. Example Return Value:: 2009-05-04T17:05:33 Steve Zabak 2009-05-06T17:05:33 Steve Zabak active false ... -------- .. http:post:: /records/{RECORD_ID}/inbox/{MESSAGE_ID} Send a message to a record. :shortname: record_send_message :accesscontrol: Any admin app, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter MESSAGE_ID: The unique external identifier of the Indivo Message, for idempotency. :formparameter body: The message body. Defaults to ``[no body]``. :formparameter body_type: The formatting for the message body. Options are ``plaintext``, ``markdown``. Defaults to ``plaintext``. :formparameter num_attachments: The number of attachments this message requires. Attachments are uploaded with calls to :http:post:`/records/{RECORD_ID}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM}`. Defaults to 0. :formparameter severity: The importance of the message. Options are ``low``, ``medium``, ``high``. Defaults to ``low``. :formparameter subject: The message subject. Defaults to ``[no subject]``. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if ``MESSAGE_ID`` was a duplicate. Also triggers notification emails to accounts authorized to view messages for the passed record. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM} Attach a document to an Indivo message. :shortname: record_message_attach :accesscontrol: Any admin app, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :parameter ATTACHMENT_NUM: The 1-indexed number corresponding to the message attachment :parameter MESSAGE_ID: The unique identifier of the Indivo Message :rawdata: The raw XML attachment data. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if ``ATTACHMENT_NUM`` has already been uploaded. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/notifications/ Send a notification about a record to all accounts authorized to be notified. :shortname: record_notify :accesscontrol: Any admin app, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :formparameter content: The plaintext content of the notification. :formparameter app_url: A callback url to the app for more information. **OPTIONAL**. :formparameter document_id: The id of the document to which this notification pertains. **OPTIONAL**. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if *content* wasn't passed. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/notify Send a notification about a record to all accounts authorized to be notified. :shortname: record_notify :accesscontrol: Any admin app, or a user app with access to the record. :parameter RECORD_ID: The id string associated with the Indivo record :formparameter content: The plaintext content of the notification. :formparameter app_url: A callback url to the app for more information. **OPTIONAL**. :formparameter document_id: The id of the document to which this notification pertains. **OPTIONAL**. :returns: :http:statuscode:`200 Success`, or :http:statuscode:`400` if *content* wasn't passed. Example Return Value:: .. deprecated:: 1.0 Use :http:post:`/records/{RECORD_ID}/notifications/` instead. -------- .. http:get:: /records/{RECORD_ID}/owner Get the owner of a record. :shortname: record_get_owner :accesscontrol: A principal in full control of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200 Success.` Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/owner Set the owner of a record. :shortname: record_set_owner :accesscontrol: Any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :rawdata: The email address of the new account owner. :returns: :http:statuscode:`200` with information about the account, or :http:statuscode:`400` if the passed email address is invalid. Example Return Value:: Joe User joeuser@gmail.com 2010-05-04T15:34:23Z 43 0 active 2009-04-03T13:12:12Z -------- .. http:put:: /records/{RECORD_ID}/owner Set the owner of a record. :shortname: record_set_owner :accesscontrol: Any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :rawdata: The email address of the new account owner. :returns: :http:statuscode:`200` with information about the account, or :http:statuscode:`400` if the passed email address is invalid. Example Return Value:: Joe User joeuser@gmail.com 2010-05-04T15:34:23Z 43 0 active 2009-04-03T13:12:12Z -------- .. http:get:: /records/{RECORD_ID}/reports/experimental/ccr Export patient data as a Continuity of Care Record (CCR) document. :shortname: report_ccr :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200` with an **EXPERIMENTAL** CCR document. Example Return Value:: 0 ENGLISH V1.0 Create DisplayDate 09/30/10 2010-05-04T15:34:23Z 123 789 Dispense date 2010-05-04T15:34:23Z Active Vioxx C1234 RxNorm 20 mg 1 Pills Oral 1QR ... 567 Start date 2010-05-04T15:34:23Z Rubella C1345 HL7 Vaccines ... ... ... -------- .. http:get:: /records/{RECORD_ID}/reports/minimal/equipment/ List the equipment data for a given record. :shortname: equipment_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of equipment, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2009-02-05 2010-06-12 cardiac Pacemaker Acme Medical Devices 167-ABC-23 it works blah blah blah ... -------- .. http:get:: /records/{RECORD_ID}/reports/minimal/measurements/{LAB_CODE}/ List the measurement data for a given record. :shortname: measurement_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter LAB_CODE: The identifier corresponding to the measurement being made. :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of measurements, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false ... -------- .. http:get:: /records/{RECORD_ID}/reports/minimal/procedures/ List the procedure data for a given record. :shortname: procedure_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of procedures, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2009-05-16T12:00:00 Appendectomy Kenneth Mandl Children's Hospital Boston ... -------- .. http:get:: /records/{RECORD_ID}/reports/minimal/simple-clinical-notes/ List the simple_clinical_notes data for a given record. :shortname: simple_clinical_notes_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :returns: :http:statuscode:`200` with a list of notes, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: 2011-05-02T17:48:13Z full name active false 2010-02-02T12:00:00Z 2010-02-03T13:12:00Z Acute Care Longfellow Medical Hematology/Oncology 2010-02-03T13:12:00Z Kenneth Mandl Children's Hospital Boston Isaac Kohane Children's Hospital Boston stomach ache Patient presents with ... ... -------- .. http:get:: /records/{RECORD_ID}/reports/{DATA_MODEL}/ List the Model data for a given record. :shortname: generic_list :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter DATA_MODEL: The name of the data model to report on :queryparameter status: The account or document status to filter by :queryparameter {FIELD}: See :ref:`query-operators`, :ref:`valid-query-fields` :queryparameter date_group: See :ref:`query-operators` :queryparameter group_by: See :ref:`query-operators` :queryparameter order_by: See :ref:`query-operators` :queryparameter aggregate_by: See :ref:`query-operators` :queryparameter date_range: See :ref:`query-operators` :queryparameter limit: See :ref:`query-operators` :queryparameter offset: See :ref:`query-operators` :queryparameter response_format: See :ref:`response_formats` :returns: :http:statuscode:`200` with a list of DATA_MODELs, or :http:statuscode:`400` if any invalid query parameters were passed. Example Return Value:: SDMJ Example: { "__modelname__": "TestMedication", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "name": "ibuprofen", "date_started": "2010-10-01T00:00:00Z", "date_stopped": "2010-10-31T00:00:00Z", "brand_name": "Advil", "prescription": { "__modelname__": "TestPrescription", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "prescribed_by_name": "Kenneth D. Mandl", "prescribed_by_institution": "Children's Hospital Boston", "prescribed_on": "2010-09-30T00:00:00Z", "prescribed_stop_on": "2010-10-31T00:00:00Z" }, "fills": [ { "__modelname__": "TestFill", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "date_filled": "2010-10-01T00:00:00Z", "supply_days": "15", "filled_at_name": "CVS" }, { "__modelname__": "TestFill", "__documentid__": "b1d83191-6edd-4aad-be4e-63117cd4c660", "date_filled": "2010-10-16T00:00:00Z", "supply_days": "15", "filled_at_name": "CVS" } ] } SDMX Example: 2010-10-01T00:00:00Z ibuprofen Advil 2010-10-31T00:00:00Z Kenneth D. Mandl Children's Hospital Boston 2010-09-30T00:00:00Z 2010-10-31T00:00:00Z 2010-10-01T00:00:00Z 15 CVS 2010-10-16T00:00:00Z 15 CVS -------- .. http:get:: /records/{RECORD_ID}/shares/ List the shares of a record. :shortname: record_shares :accesscontrol: The owner of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :returns: :http:statuscode:`200` with a list of shares. Example Return Value:: ... -------- .. http:post:: /records/{RECORD_ID}/shares/ Fully share a record with another account. :shortname: record_share_add :accesscontrol: The owner of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :formparameter account_id: The email address of the recipient account. **REQUIRED**. :formparameter role_label: A label for the share, usually the relationship between the owner and the recipient (i.e. ``Guardian``). **OPTIONAL**. :returns: :http:statuscode:`200 Success`, :http:statuscode:`400` if *account_id* was not passed, or :http:statuscode:`404` if the passed *account_id* was invalid. Example Return Value:: -------- .. http:delete:: /records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID} Undo a full record share with an account. :shortname: record_share_delete :accesscontrol: The owner of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :parameter OTHER_ACCOUNT_ID: The email identifier of the Indivo account to share with :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``OTHER_ACCOUNT_ID`` is invalid. Example Return Value:: -------- .. http:post:: /records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID}/delete Undo a full record share with an account. :shortname: record_share_delete :accesscontrol: The owner of the record, or any admin app. :parameter RECORD_ID: The id string associated with the Indivo record :parameter OTHER_ACCOUNT_ID: The email identifier of the Indivo account to share with :returns: :http:statuscode:`200 Success`, or :http:statuscode:`404` if ``OTHER_ACCOUNT_ID`` is invalid. Example Return Value:: .. deprecated:: 1.0 Use :http:delete:`/records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID}` instead. -------- .. http:get:: /records/{RECORD_ID}/{MODEL_NAME}/ SMART-compatible alias for the generic list view: returns data_models serialized as SMART RDF. :shortname: smart_generic :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter MODEL_NAME: The name of the SMART data_model to retrieve (i.e. ``problems``). Options are defined by the `SMART API `_. :returns: :http:statuscode:`200` with SMART RDF/XML for all items matching **MODEL_NAME** belonging to the record. Example Return Value:: 2010-09-13T00:00:00 2007-06-02T00:00:00 Hyperlipidemia 2010-09-13T00:00:00 2007-01-22T00:00:00 Clinical finding http://purl.bioontology.org/ontology/SNOMEDCT/ 165084003 2010-09-13T00:00:00 2007-09-26T00:00:00 Chronic non-suppurative otitis media Injury of head http://purl.bioontology.org/ontology/SNOMEDCT/ 82271004 2010-09-13T00:00:00 2007-01-28T00:00:00 Abrasion or friction burn of other, multiple, and unspecified sites, without mention of infection http://purl.bioontology.org/ontology/SNOMEDCT/ 399963005 Chronic non-suppurative otitis media http://purl.bioontology.org/ontology/SNOMEDCT/ 21186006 2010-09-13T00:00:00 2004-09-20T00:00:00 Acute bronchitis Closed fracture of malar AND/OR maxillary bones http://purl.bioontology.org/ontology/SNOMEDCT/ 34649000 Closed fracture of malar AND/OR maxillary bones 2010-09-13T00:00:00 2007-01-22T00:00:00 Clinical finding Injury of head Abrasion or friction burn of other, multiple, and unspecified sites, without mention of infection Acute bronchitis http://purl.bioontology.org/ontology/SNOMEDCT/ 10509002 2010-09-13T00:00:00 2004-09-20T00:00:00 Hyperlipidemia http://purl.bioontology.org/ontology/SNOMEDCT/ 55822004 .. versionadded:: 2.0.0 -------- .. http:get:: /records/{RECORD_ID}/{MODEL_NAME}/{MODEL_ID} Retrieve a specific instance of a SMART model. :shortname: smart_generic_instance :accesscontrol: A user app with access to the record, or a principal in full control of the record :parameter RECORD_ID: The id string associated with the Indivo record :parameter MODEL_ID: The id of the SMART data_model to retrieve :parameter MODEL_NAME: The name of the SMART data model to retrieve (i.e. ``problems``). Options are defined by the `SMART API `_. :returns: :http:statuscode:`200` with SMART RDF/XML for the item matching **MODEL_NAME** and **MODEL_ID** belonging to the record. Example Return Value:: http://smartplatforms.org/terms/codes/LabResultInterpretation# Normal normal mEq/L 120 Serum Sodium Lab Specialist mEq/L 135 mEq/L 140 Final results: complete and verified Normal City Lab 11111 20 Elm St MA Springfield USA http://purl.bioontology.org/ontology/LNC/ Serum Sodium 2951-2 mEq/L 145 Finnialispi Tad Blood sample appears to have hemolyzed AC09205823577 http://smartplatforms.org/terms/codes/LabStatus# Final results: complete and verified final 2010-12-27T17:00:00 mEq/L 155 .. versionadded:: 2.1.0 -------- .. http:get:: /version Return the current version of Indivo. :shortname: get_version :accesscontrol: Any principal in Indivo. :returns: :http:statuscode:`200` with the current version of Indivo. Example Return Value:: 1.0.0.0