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 Indivo API.

In the access control for some calls, you might see the phrase full control. In Indivo, this is defined as follows:

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.

POST /accounts/

Create a new account, and send out initialization emails.

Short Name:

account_create

Accessible By:

Any admin app.

Formdata Parameters:
 
  • primary_secret_p – 0 or 1: Does this account require a primary secret?
  • secondary_secret_p – 0 or 1: Does this account require a secondary secret?
  • contact_email – A valid email at which to reach the account holder.
  • account_id – An identifier for the new account. Must be a valid email address. REQUIRED
  • full_name – The full name to associate with the account.
Returns:

200 OK with information about the new account on success, 400 Bad Request if ACCOUNT_ID isn’t passed or is already used.

Example Return Value:

<Account id="joeuser@indivo.example.org">
  <fullName>Joe User</fullName>
  <contactEmail>joeuser@gmail.com</contactEmail>
  <lastLoginAt>2010-05-04T15:34:23Z</lastLoginAt>
  <totalLoginCount>43</totalLoginCount>
  <failedLoginCount>0</failedLoginCount>
  <state>active</state>
  <lastStateChange>2009-04-03T13:12:12Z</lastStateChange>

  <authSystem name="password" username="joeuser" />
  <authSystem name="hospital_sso" username="Joe_User" />
</Account>

Search for accounts by name or email.

Short Name:

account_search

Accessible By:

Any admin app.

Query Parameters:
 
  • fullname – The full name of the account to search for
  • contact_email – The contact email of the account to search for
Returns:

200 OK with information about matching accounts, or 400 Bad Request if no search parameters are passed.

Example Return Value:

<Accounts>
  <Account id="joeuser@indivo.example.org">
    <fullName>Joe User</fullName>
    <contactEmail>joeuser@gmail.com</contactEmail>
    <lastLoginAt>2010-05-04T15:34:23Z</lastLoginAt>
    <totalLoginCount>43</totalLoginCount>
    <failedLoginCount>0</failedLoginCount>
    <state>active</state>
    <lastStateChange>2009-04-03T13:12:12Z</lastStateChange>

    <authSystem name="password" username="joeuser" />
    <authSystem name="hospital_sso" username="Joe_User" />
  </Account>

  ...

</Accounts>

GET /accounts/{ACCOUNT_EMAIL}

Display information about an account.

Short Name:

account_info

Accessible By:

Any admin app, or the Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 OK with information about the account

Example Return Value:

<Account id="joeuser@indivo.example.org">
  <fullName>Joe User</fullName>
  <contactEmail>joeuser@gmail.com</contactEmail>
  <lastLoginAt>2010-05-04T15:34:23Z</lastLoginAt>
  <totalLoginCount>43</totalLoginCount>
  <failedLoginCount>0</failedLoginCount>
  <state>active</state>
  <lastStateChange>2009-04-03T13:12:12Z</lastStateChange>

  <authSystem name="password" username="joeuser" />
  <authSystem name="hospital_sso" username="Joe_User" />
</Account>

POST /accounts/{ACCOUNT_EMAIL}/authsystems/

Add a new method of authentication to an account.

Short Name:

account_authsystem_add

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • username – The username for this account
  • password – The password for this account
  • system – The identifier of the desired authsystem. password indicates the internal password system.
Returns:

200 Success, 403 Forbidden if the indicated auth system doesn’t exist, and 400 Bad Request 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:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/authsystems/password/change

Change a account’s password.

Short Name:

account_password_change

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • new – The desired new password.
  • old – The existing account password.
Returns:

200 Success, 403 Forbidden if the old password didn’t validate, or 400 Bad Request if both a new and old password weren’t passed.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/authsystems/password/set

Force the password of an account to a given value.

Short Name:

account_password_set

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • password – The new password to set.
Returns:

200 Success, or 400 Bad Request if a new password wasn’t passed.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/authsystems/password/set-username

Force the username of an account to a given value.

Short Name:

account_username_set

Accessible By:

Any admin app, or the Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • username – The new username to set.
Returns:

200 Success, 400 Bad Request if a username wasn’t passed.

Example Return Value:

<ok/>

GET /accounts/{ACCOUNT_EMAIL}/check-secrets/{PRIMARY_SECRET}

Validate an account’s primary and secondary secrets.

Short Name:

account_check_secrets

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
  • PRIMARY_SECRET – A confirmation string sent securely to the patient from Indivo
Query Parameters:
 
  • secondary_secret – The secondary secret of the account to check.
Returns:

200 Success, or 403 Forbidden if validation fails.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/forgot-password

Resets an account if the user has forgotten its password.

Short Name:

account_forgot_password

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

:http:statuscode`200` with the account’s new secondary secret, or 400 Bad Request if the account hasn’t yet been initialized.

Example Return Value:

<secret>123456</secret>

GET /accounts/{ACCOUNT_EMAIL}/inbox/

List messages in an account’s inbox.

Short Name:

account_inbox

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Query Parameters:
 
  • status – The account or document status to filter by
  • order_by – See Query Operators
  • limit – See Query Operators
  • include_archive – 0 or 1: whether or not to include archived messages in the result set.
  • offset – See Query Operators
Returns:

200 OK, with a list of inbox messages.

Example Return Value:

<Messages>
  <Message id="879">
    <sender>doctor@example.indivo.org</sender>
    <received_at>2010-09-04T14:12:12Z</received_at>
    <read_at>2010-09-04T17:13:24Z</read_at>
    <subject>your test results are looking good</subject>
    <severity>normal</severity>
    <record id="123" />
    <attachment num="1" type="http://indivo.org/vocab/xml/documents#Lab" size="12546" />
  </Message>

  ...

</Messages>

POST /accounts/{ACCOUNT_EMAIL}/inbox/

Send a message to an account.

Short Name:

account_send_message

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • body – The message body. Defaults to [no body].
  • severity – The importance of the message. Options are low, medium, high. Defaults to low.
  • message_id – An external identifier for the message.
  • subject – The message subject. Defaults to [no subject].
Returns:

200 Success, 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:

<ok/>

GET /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID}

Retrieve an individual message from an account’s inbox.

Short Name:

account_inbox_message

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
  • MESSAGE_ID – The unique identifier of the Indivo Message
Returns:

200 OK, with XML describing the message.

Example Return Value:

<Message id="879">
  <sender>doctor@example.indivo.org</sender>
  <received_at>2010-09-04T14:12:12Z</received_at>
  <read_at>2010-09-04T17:13:24Z</read_at>
  <archived_at>2010-09-04T17:15:24Z</archived_at>
  <subject>your test results are looking good</subject>
  <body>Great results!
 It seems you'll live forever!</body>
  <severity>normal</severity>
  <record id="123" />
  <attachment num="1" type="http://indivo.org/vocab/xml/documents#Lab" size="12546" />
</Message>

POST /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID}/archive

Archive a message.

Short Name:

account_message_archive

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
  • MESSAGE_ID – The unique identifier of the Indivo Message
Returns:

200 Success.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM}/accept

Accept a message attachment into the record it corresponds to.

Short Name:

account_inbox_message_attachment_accept

Accessible By:

The Account owner.

URL Parameters:
  • ATTACHMENT_NUM – The 1-indexed number corresponding to the message attachment
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
  • MESSAGE_ID – The unique identifier of the Indivo Message
Returns:

200 Success, or 410 Gone if the attachment has already been saved.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/info-set

Set basic information about an account.

Short Name:

account_info_set

Accessible By:

Any admin app, or the Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • contact_email – A valid email at which to reach the account holder.
  • full_name – The full name of the account.
Returns:

200 OK, or 400 Bad Request if no parameters are passed in.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/initialize/{PRIMARY_SECRET}

Initialize an account, activating it.

Short Name:

account_initialize

Accessible By:

Any Indivo UI app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
  • PRIMARY_SECRET – A confirmation string sent securely to the patient from Indivo
Formdata Parameters:
 
  • secondary_secret
Returns:

200 Success, 403 Forbidden if the account has already been initialized or if secrets didn’t validate, and 400 Bad Request if a secondary secret was required but missing.

Example Return Value:

<ok/>

GET /accounts/{ACCOUNT_EMAIL}/notifications/

List an account’s notifications.

Short Name:

account_notifications

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Query Parameters:
 
Returns:

200 OK with a list of the account’s notifications.

Example Return Value:

<Notifications>
  <Notification id="468">
    <sender>labs@apps.indivo.org</sender>
    <received_at>2010-09-03T15:12:12Z</received_at>
    <content>A new lab result has been delivered to your account</content>
    <record id="123" label="Joe User" />
    <document id="579" label="Lab Test 2" />
  </Notification>

  ...

</Notifications>

GET /accounts/{ACCOUNT_EMAIL}/permissions/

List the carenets that an account has access to.

Short Name:

account_permissions

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 OK with a list of carenets.

Example Return Value:

<Carenets record_id="01234">
    <Carenet id="456" name="family" mode="explicit" />
    <Carenet id="567" name="school" mode="explicit" />
</Carenets>

GET /accounts/{ACCOUNT_EMAIL}/primary-secret

Display an account’s primary secret.

Short Name:

account_primary_secret

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 OK, with the primary secret.

Example Return Value:

<secret>123absxzyasdg13b</secret>

Deprecated since version 1.0.0: Avoid sending primary secrets over the wire. Instead, use GET /accounts/{ACCOUNT_EMAIL}/check-secrets/{PRIMARY_SECRET}.


GET /accounts/{ACCOUNT_EMAIL}/records/

List all available records for an account.

Short Name:

record_list

Accessible By:

The Account owner.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Query Parameters:
 
Returns:

200 OK, with a list of records owned or shared with the account.

Example Return Value:

<Records>
  <Record id="123" label="John R. Smith" />
  <Record id="234" label="John R. Smith Jr. (shared)" shared="true" role_label="Guardian" />
  <Record id="345" label="Juanita R. Smith (carenet)" shared="true" carenet_id="678" carenet_name="family" />

  ...

</Records>

POST /accounts/{ACCOUNT_EMAIL}/reset

Reset an account to an uninitialized state.

Short Name:

account_reset

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 Success.

Example Return Value:

<ok/>

GET /accounts/{ACCOUNT_EMAIL}/secret

Return the secondary secret of an account.

Short Name:

account_secret

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 OK, with the secondary secret.

Example Return Value:

<secret>123456</secret>

POST /accounts/{ACCOUNT_EMAIL}/secret-resend

Sends an account user their primary secret in case they lost it.

Short Name:

account_resend_secret

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Returns:

200 Success. Also emails the account with their new secret.

Example Return Value:

<ok/>

POST /accounts/{ACCOUNT_EMAIL}/set-state

Set the state of an account.

Short Name:

account_set_state

Accessible By:

Any admin app.

URL Parameters:
  • ACCOUNT_EMAIL – The email identifier of the Indivo account
Formdata Parameters:
 
  • state – The desired state of the account. Options are active, disabled, retired.
Returns:

200 Success, or 403 Forbidden if the account has been retired and can no longer change state.

Example Return Value:

<ok/>

GET /apps/

List all available userapps.

Short Name:all_phas
Accessible By:Any principal in Indivo.
Returns:200 OK, with a list of userapps.

Example Return Value:

<Apps>
  <App id="problems@apps.indivo.org">
    <startURLTemplate>http://problems.indivo.org/auth/start?record_id={record_id}&amp;carenet_id={carenet_id}</startURLTemplate>
    <name>Problem List</name>
    <description>Managing your problem list</description>
    <autonomous>false</autonomous>
    <frameable>true</frameable>
    <ui>true</ui>
  </App>

  ...

</Apps>

DELETE /apps/{PHA_EMAIL}

Delete a userapp from Indivo.

Short Name:

pha_delete

Accessible By:

The user app itself.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 Success.

Example Return Value:

<ok/>

GET /apps/{PHA_EMAIL}

Return a description of a single userapp.

Short Name:

pha

Accessible By:

Any principal in Indivo.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK, with information about the userapp.

Example Return Value:

<App id="problems@apps.indivo.org">
  <startURLTemplate>http://problems.indivo.org/auth/start?record_id={record_id}&amp;carenet_id={carenet_id}</startURLTemplate>
  <name>Problem List</name>
  <description>Managing your problem list</description>
  <autonomous>false</autonomous>
  <frameable>true</frameable>
  <ui>true</ui>
</App>

GET /apps/{PHA_EMAIL}/documents/

List app-specific documents.

Short Name:

app_document_list

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
Query Parameters:
 
Returns:

200 OK with A list of documents, or http:statuscode:404 if an invalid type was passed in the querystring.

Example Return Value:

<Documents record_id="" total_document_count="4" pha="problems@apps.indivo.org">
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

POST /apps/{PHA_EMAIL}/documents/

Create an app-specific Indivo document.

Short Name:

app_document_create

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create.

Returns:

200 OK with the metadata of the created document, or 400 Bad Request if the new document failed validation.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

PUT /apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID}

Create an app-specific Indivo document with an associated external id.

Short Name:

app_document_create_or_update_ext

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create.

Returns:

200 OK with the metadata of the created or updated document, or 400 Bad Request if the passed content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

GET /apps/{PHA_EMAIL}/documents/external/{EXTERNAL_ID}/meta

Fetch the metadata of an app-specific document identified by external id.

Short Name:

app_document_meta_ext

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK with metadata describing the specified document, or http:statuscode:404 if the external_id is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="problems@apps.indivo.org" type="pha">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

DELETE /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}

Delete an app-specific document.

Short Name:

app_document_delete

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

</ok>

GET /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}

Retrive an app-specific document.

Short Name:

app_specific_document

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the raw content of the document, or 404 Not Found if the document could not be found.

Example Return Value:

<DefaultProblemsPreferences record_id="123">
  <Preference name="hide_void" value="true" />
  <Preference name="show_rels" value="false" />
</DefaultProblemsPreferences>

PUT /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}

Create or Overwrite an app-specific Indivo document.

Short Name:

app_document_create_or_update

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 OK with metadata describing the created or updated document, or 400 Bad Request if the passed content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="problems@apps.indivo.org" type="pha">
  </creator>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

PUT /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/label

Set the label of an app-specific document.

Short Name:

app_document_label

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The new label for the document

Returns:

200 OK with metadata describing the re-labeled document, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>RELABELED: New HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/meta

Fetch the metadata of an app-specific document.

Short Name:

app_document_meta

Accessible By:

A user app with an id matching the app email in the URL.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the document metadata, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /apps/{PHA_EMAIL}/records/

Return a list of all records that have this pha enabled.

Short Name:

app_record_list

Accessible By:

Any autonomous user app.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK with a list of records on success.

Example Return Value:

<Records>
  <Record id="123" label="John R. Smith" />
  <Record id = "234" label="Frank Frankson" />

  ...

</Records>

New in version 1.0.0.


POST /apps/{PHA_EMAIL}/records/{RECORD_ID}/access_token

Fetch an access token for an autonomous app to access a record.

Short Name:

autonomous_access_token

Accessible By:

An autonomous user app with a record on which the app is authorized to run.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK 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

New in version 1.0.0.


DELETE /carenets/{CARENET_ID}

Delete a carenet.

Short Name:

carenet_delete

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 Success.

Example Return Value:

<ok/>

GET /carenets/{CARENET_ID}/accounts/

List the accounts in a carenet.

Short Name:

carenet_account_list

Accessible By:

A principal in the carenet, in full control of the carenet’s record, or any admin app.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with a list of accounts in the specified carenet.

Example Return Value:

<CarenetAccounts>
  <CarenetAccount id="johndoe@indivo.org" fullName="John Doe" write="true" />

  ...

</CarenetAccounts>

POST /carenets/{CARENET_ID}/accounts/

Add an account to a carenet.

Short Name:

carenet_account_create

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Formdata Parameters:
 
  • writetrue or false. Whether this account can write to the carenet.
  • account_id – An identifier for the account. Must be a valid email address.
Returns:

200 Success, 404 Not Found if the specified account or carenet don’t exist, or 400 Bad Request if an account_id isn’t passed.

Example Return Value:

<ok/>

DELETE /carenets/{CARENET_ID}/accounts/{ACCOUNT_ID}

Remove an account from a carenet.

Short Name:

carenet_account_delete

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • ACCOUNT_ID – The email identifier of the Indivo account
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 Success, or 404 Not Found if either the passed account or the passed carenet doesn’t exist.

Example Return Value:

<ok/>

GET /carenets/{CARENET_ID}/accounts/{ACCOUNT_ID}/permissions

List the permissions of an account within a carenet.

Short Name:

carenet_account_permissions

Accessible By:

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.

URL Parameters:
  • ACCOUNT_ID – The email identifier of the Indivo account
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with a list of document types that the account can access within a carenet. Currently always returns all document types.

Example Return Value:

<Permissions>
  <DocumentType type="*" write="true" />
</Permissions>

GET /carenets/{CARENET_ID}/apps/

List Apps within a given carenet.

Short Name:

carenet_apps_list

Accessible By:

A principal in the carenet, in full control of the carenet’s record, or any admin app.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with a list of applications in the carenet.

Example Return Value:

<Apps>
  <App id="problems@apps.indivo.org">
    <startURLTemplate>http://problems.indivo.org/auth/start?record_id={record_id}&amp;carenet_id={carenet_id}</startURLTemplate>
    <name>Problem List</name>
    <description>Managing your problem list</description>
    <autonomous>false</autonomous>
    <frameable>true</frameable>
    <ui>true</ui>
  </App>

  ...

</Apps>

DELETE /carenets/{CARENET_ID}/apps/{PHA_EMAIL}

Remove an app from a given carenet.

Short Name:

carenet_apps_delete

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 Success.

Example Return Value:

<ok/>

PUT /carenets/{CARENET_ID}/apps/{PHA_EMAIL}

Add an app to a carenet

Short Name:

carenet_apps_create

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 Success, or 400 Bad Request if the passed PHA is autonomous (autonomous apps can’t be scoped to carenets).

Example Return Value:

<ok/>

GET /carenets/{CARENET_ID}/apps/{PHA_EMAIL}/permissions

Retrieve the permissions for an app within a carenet. NOT IMPLEMENTED.

Short Name:

carenet_app_permissions

Accessible By:

Nobody

URL Parameters:
  • PHA_EMAIL – The email identifier of the Indivo user app
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK. This call is unimplemented, and has no effect.

Example Return Value:

<ok/>

Todo

The API Call ‘GET /carenets/{0}/apps/{1}/permissions’ is not yet implemented.


GET /carenets/{CARENET_ID}/documents/

List documents from a given carenet.

Short Name:

carenet_document_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
  • type – The Indivo document type to filter by
Returns:

200 OK with a document list on success, 404 Not Found if type doesn’t exist.

Example Return Value:

<Documents record_id="123" total_document_count="3" pha="" >
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

GET /carenets/{CARENET_ID}/documents/special/{SPECIAL_DOCUMENT}

Read a special document from a carenet.

Short Name:

read_special_document_carenet

Accessible By:

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 the admin app that created the carenet’s record.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
  • SPECIAL_DOCUMENT – The type of special document to access. Options are demographics, contact
Returns:

200 OK with the special document’s raw content, or 404 Not Found if the document hasn’t been created yet.

Example Return Value:

<Contact xmlns="http://indivo.org/vocab/xml/documents#">
    <name>
        <fullName>Sebastian Rockwell Cotour</fullName>
        <givenName>Sebastian</givenName>
        <familyName>Cotour</familyName>
    </name>
    <email type="personal">
        scotour@hotmail.com
    </email>

    <email type="work">
        sebastian.cotour@childrens.harvard.edu
    </email>
    <address type="home">
        <streetAddress>15 Waterhill Ct.</streetAddress>
        <postalCode>53326</postalCode>
        <locality>New Brinswick</locality>
        <region>Montana</region>

        <country>US</country>
        <timeZone>-7GMT</timeZone>
    </address>
    <location type="home">
        <latitude>47N</latitude>
        <longitude>110W</longitude>
    </location>
    <phoneNumber type="home">5212532532</phoneNumber>
    <phoneNumber type="work">6217233734</phoneNumber>
    <instantMessengerName protocol="aim">scotour</instantMessengerName>
</Contact>

GET /carenets/{CARENET_ID}/documents/{DOCUMENT_ID}

Return a document from a carenet.

Short Name:

carenet_document

Accessible By:

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.

URL Parameters:
  • DOCUMENT_ID – The unique identifier of the Indivo document
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with the document content on success, 404 Not Found if document_id is invalid or if the document is not shared in the carenet.

Example Return Value:

<ExampleDocument>
  <content>That's my content</content>
  <otherField attr="val" />
</ExampleDocument>

GET /carenets/{CARENET_ID}/documents/{DOCUMENT_ID}/meta

Fetch the metadata of a record-specific document via a carenet.

Short Name:

carenet_document_meta

Accessible By:

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.

URL Parameters:
  • DOCUMENT_ID – The unique identifier of the Indivo document
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with the document’s metadata, or 404 Not Found if document_id doesn’t identify an existing document in the carenet.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /carenets/{CARENET_ID}/record

Get basic information about the record to which a carenet belongs.

Short Name:

carenet_record

Accessible By:

Nobody

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Returns:

200 OK with XML describing the record.

Example Return Value:

<Record id="123" label="Joe User">
  <contact document_id="790" />
  <demographics document_id="467" />
  <created at="2010-10-23T10:23:34Z" by="indivoconnector@apps.indivo.org" />
</Record>

POST /carenets/{CARENET_ID}/rename

Change a carenet’s name.

Short Name:

carenet_rename

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Formdata Parameters:
 
  • name – The new name for the carenet.
Returns:

200 OK with XML describing the renamed carenet on success, 400 Bad Request if name wasn’t passed or if a carenet named name already exists on this record.

Example Return Value:

<Carenets record_id="123">
    <Carenet id="789" name="Work/School" mode="explicit" />
</Carenets>

GET /carenets/{CARENET_ID}/reports/minimal/allergies/

List the allergy data for a given carenet.

Short Name:

carenet_allergy_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of allergies, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Allergy xmlns="http://indivo.org/vocab/xml/documents#">
        <dateDiagnosed>2009-05-16</dateDiagnosed>
        <diagnosedBy>Children's Hospital Boston</diagnosedBy>
        <allergen>
          <type type="http://codes.indivo.org/codes/allergentypes/" value="drugs">Drugs</type>
          <name type="http://codes.indivo.org/codes/allergens/" value="penicillin">Penicillin</name>
        </allergen>
        <reaction>blue rash</reaction>
        <specifics>this only happens on weekends</specifics>
      </Allergy>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/equipment/

List the equipment data for a given carenet.

Short Name:

carenet_equipment_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of equipment, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Equipment xmlns="http://indivo.org/vocab/xml/documents#">
        <dateStarted>2009-02-05</dateStarted>
        <dateStopped>2010-06-12</dateStopped>
        <type>cardiac</type>
        <name>Pacemaker</name>
        <vendor>Acme Medical Devices</vendor>
        <id>167-ABC-23</id>
        <description>it works</description>
        <specification>blah blah blah</specification>
      </Equipment>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/immunizations/

List the immunization data for a given carenet.

Short Name:

carenet_immunization_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of immunizations, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Immunization xmlns="http://indivo.org/vocab/xml/documents#">
        <dateAdministered>2009-05-16T12:00:00</dateAdministered>
        <administeredBy>Children's Hospital Boston</administeredBy>
        <vaccine>
          <type type="http://codes.indivo.org/vaccines#" value="hep-B">Hepatitis B</type>
          <manufacturer>Oolong Pharmaceuticals</manufacturer>
          <lot>AZ1234567</lot>
          <expiration>2009-06-01</expiration>
        </vaccine>
        <sequence>2</sequence>
        <anatomicSurface type="http://codes.indivo.org/anatomy/surfaces#" value="shoulder">Shoulder</anatomicSurface>
        <adverseEvent>pain and rash</adverseEvent>
      </Immunization>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/labs/

List the lab data for a given carenet.

Short Name:

carenet_lab_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of labs, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="lab_type" value="hematology"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <LabReport xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>1998-07-16T12:00:00Z</dateMeasured>
        <labType>hematology</labType>
        <laboratory>
          <name>Quest</name>
          <address>300 Longwood Ave, Boston MA 02215</address>
        </laboratory>
        <comments>was looking pretty sick</comments>
        <firstPanelName>CBC</firstPanelName>
      </LabReport>
    </Item>
  </Report>
  <Report>
    <Meta>
      <Document id="1b7270a6-5925-450c-9273-5a74386cef63" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="c1be22813ab83f6b3858878a802f372eef754fcdd285e44a5fdb7387d6ee3667" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="1b7270a6-5925-450c-9273-5a74386cef63"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <LabReport xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-07-16T12:00:00Z</dateMeasured>
        <labType>hematology</labType>
        <laboratory>
          <name>Quest</name>
          <address>300 Longwood Ave, Boston MA 02215</address>
        </laboratory>
        <comments>was looking pretty sick</comments>
        <firstPanelName>CBC</firstPanelName>
      </LabReport>
    </Item>
  </Report>
</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/measurements/{LAB_CODE}/

List the measurement data for a given carenet.

Short Name:

carenet_measurement_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
  • LAB_CODE – The identifier corresponding to the measurement being made.
Query Parameters:
 
Returns:

200 OK with a list of measurements, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="lab_type" value="hematology"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Measurement" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Measurement id="1234" value="120" type="blood pressure systolic" datetime="2011-03-02T00:00:00Z" unit="mmHg" source_doc="3456" />
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/medications/

List the medication data for a given carenet.

Short Name:

carenet_medication_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of medications, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Medication" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Medication xmlns="http://indivo.org/vocab/xml/documents#">
        <dateStarted>2009-02-05</dateStarted>
        <name type="http://indivo.org/codes/meds#" abbrev="c2i" value="COX2 Inhibitor" />
        <brandName type="http://indivo.org/codes/meds#" abbrev="vioxx" value="Vioxx" />
        <dose>
          <value>3</value>
          <unit type="http://indivo.org/codes/units#" value="pills" abbrev="p" />
        </dose>
        <route type="http://indivo.org/codes/routes#" value="PO">By Mouth</route>
        <strength>
          <value>100</value>
          <unit type="http://indivo.org/codes/units#" value="mg" abbrev="mg">Milligrams</unit>
        </strength>
        <frequency type="http://indivo.org/codes/frequency#" value="daily">daily</frequency>

        <prescription>
          <by>
            <name>Dr. Ken Mandl</name>
            <institution>Children's Hospital Boston</institution>
          </by>

          <on>2009-02-01</on>
          <stopOn>2010-01-31</stopOn>

          <dispenseAsWritten>true</dispenseAsWritten>

          <!-- this duration means 2 months -->
          <duration>P2M</duration>

          <!-- does this need more structure? -->
          <refillInfo>once a month for 3 months</refillInfo>

          <instructions>don't take them all at once!</instructions>

        </prescription>
      </Medication>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/problems/

List the problem data for a given carenet.

Short Name:

carenet_problem_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of problems, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Problem" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Problem xmlns="http://indivo.org/vocab/xml/documents#">
        <dateOnset>2009-05-16T12:00:00</dateOnset>
        <dateResolution>2009-05-16T16:00:00</dateResolution>
        <name type="http://codes.indivo.org/problems/" value="123" abbrev="MI">Myocardial Infarction</name>
        <comments>mild heart attack</comments>
        <diagnosedBy>Dr. Mandl</diagnosedBy>
      </Problem>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/procedures/

List the procedure data for a given carenet.

Short Name:

carenet_procedure_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of procedures, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Procedure" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Procedure xmlns="http://indivo.org/vocab/xml/documents#">
        <datePerformed>2009-05-16T12:00:00</datePerformed>
        <name type="http://codes.indivo.org/procedures#" value="85" abbrev="append">Appendectomy</name>
        <provider>
          <name>Kenneth Mandl</name>
          <institution>Children's Hospital Boston</institution>
        </provider>
      </Procedure>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/simple-clinical-notes/

List the simple_clinical_notes data for a given carenet.

Short Name:

carenet_simple_clinical_notes_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#SimpleClinicalNote" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <SimpleClinicalNote xmlns="http://indivo.org/vocab/xml/documents#">
        <dateOfVisit>2010-02-02T12:00:00Z</dateOfVisit>
        <finalizedAt>2010-02-03T13:12:00Z</finalizedAt>
        <visitType type="http://codes.indivo.org/visit-types#" value="acute">Acute Care</visitType>
        <visitLocation>Longfellow Medical</visitLocation>
        <specialty type="http://codes.indivo.org/specialties#" value="hem-onc">Hematology/Oncology</specialty>

        <signature>
          <at>2010-02-03T13:12:00Z</at>
          <provider>
            <name>Kenneth Mandl</name>
            <institution>Children's Hospital Boston</institution>
          </provider>
        </signature>

        <signature>
          <provider>
            <name>Isaac Kohane</name>
            <institution>Children's Hospital Boston</institution>
          </provider>
        </signature>

        <chiefComplaint>stomach ache</chiefComplaint>
        <content>Patient presents with ... </content>
      </SimpleClinicalNote>
    </Item>
  </Report>

  ...

</Reports>

GET /carenets/{CARENET_ID}/reports/minimal/vitals/

List the vitals data for a given carenet.

Short Name:

carenet_vitals_list

Accessible By:

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.

URL Parameters:
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#VitalSign" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <VitalSign xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-05-16T15:23:21</dateMeasured>
        <name type="http://codes.indivo.org/vitalsigns/" value="123" abbrev="BPsys">Blood Pressure Systolic</name>
        <value>145</value>
        <unit type="http://codes.indivo.org/units/" value="31" abbrev="mmHg">millimeters of mercury</unit>
        <site>left arm</site>
        <position>sitting down</position>
      </VitalSign>
    </Item>
  </Report>

  ...

</Reports>
GIVE AN EXAMPLE OF A RETURN VALUE

GET /carenets/{CARENET_ID}/reports/minimal/vitals/{CATEGORY}

List the vitals data for a given carenet.

Short Name:

carenet_vitals_list

Accessible By:

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.

URL Parameters:
  • CATEGORY – The category of vital sign, i.e. weight, Blood_Pressure_Systolic
  • CARENET_ID – The id string associated with the Indivo carenet
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#VitalSign" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <VitalSign xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-05-16T15:23:21</dateMeasured>
        <name type="http://codes.indivo.org/vitalsigns/" value="123" abbrev="BPsys">Blood Pressure Systolic</name>
        <value>145</value>
        <unit type="http://codes.indivo.org/units/" value="31" abbrev="mmHg">millimeters of mercury</unit>
        <site>left arm</site>
        <position>sitting down</position>
      </VitalSign>
    </Item>
  </Report>

  ...

</Reports>

GET /codes/systems/

List available codingsystems. NOT IMPLEMENTED.

Short Name:coding_systems_list
Accessible By:Anybody
Returns:500 Internal Server Error, 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.


GET /codes/systems/{SYSTEM_SHORT_NAME}/query

Query a codingsystem for a value.

Short Name:

coding_system_query

Accessible By:

Anybody

URL Parameters:
  • SYSTEM_SHORT_NAME
Query Parameters:
 
  • q – The query string to search for
Returns:

200 OK with JSON describing codingsystems entries that matched q, or 404 Not Found 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)"}]

POST /oauth/access_token

Exchange a request token for a valid access token.

Short Name:exchange_token
Accessible By:A request signed by a RequestToken.
Returns:200 OK with an access token, or 403 Forbidden if the request token didn’t validate.

Example Return Value:

oauth_token=abcd1fw3gasdgh3&oauth_token_secret=jgrlhre4291hfjas&xoauth_indivo_record_id=123

POST /oauth/internal/request_tokens/{REQTOKEN_ID}/approve

Indicate a user’s consent to bind an app to a record or carenet.

Short Name:

request_token_approve

Accessible By:

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).

URL Parameters:
  • REQTOKEN_ID
Formdata Parameters:
 
  • record_id – The record to bind to. Either record_id or carenet_id is required.
  • carenet_id – The carenet to bind to. Either record_id or carenet_id is required.
Returns:

200 OK with a redirect url to the app on success, 403 Forbidden 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 )

POST /oauth/internal/request_tokens/{REQTOKEN_ID}/claim

Claim a request token on behalf of an account.

Short Name:

request_token_claim

Accessible By:

Any Account.

URL Parameters:
  • REQTOKEN_ID
Returns:

200 OK with the email of the claiming principal, or 403 Forbidden if the token has already been claimed.

Example Return Value:

joeuser@indivo.org

GET /oauth/internal/request_tokens/{REQTOKEN_ID}/info

Get information about a request token.

Short Name:

request_token_info

Accessible By:

Any Account.

URL Parameters:
  • REQTOKEN_ID
Returns:

200 OK with information about the token.

Example Return Value:

<RequestToken token="XYZ">
  <record id="123" />
  <carenet />
  <kind>new</kind>
  <App id="problems@apps.indivo.org">
    <name>Problem List</name>
    <description>Managing your list of problems</description>
    <autonomous>false</autonomous>
    <frameable>true</frameable>
    <ui>true</ui>
  </App>
</RequestToken>

POST /oauth/internal/session_create

Authenticate a user and register a web session for them.

Short Name:

session_create

Accessible By:

Any Indivo UI app.

Formdata Parameters:
 
  • username – The username of the user to authenticate.
  • password – The password to use with username against the internal password auth system. EITHER password or system is Required.
  • system – An external auth system to authenticate the user with. EITHER password or system is Required.
Returns:

200 OK with a valid session token, or 403 Forbidden if the passed credentials were invalid.

Example Return Value:

oauth_token=XYZ&oauth_token_secret=ABC&account_id=joeuser%40indivo.org

GET /oauth/internal/surl-verify

Verify a signed URL.

Short Name:

surl_verify

Accessible By:

Any Account.

Query Parameters:
 
  • surl_sig – The computed signature (base-64 encoded sha1) of the url.
  • surl_timestamp – when the url was generated. Must be within the past hour.
  • surl_token – The access token used to sign the url.
Returns:

200 OK with XML describing whether the surl validated.

Example Return Value:

If the surl validated:

<result>ok</result>

If the surl was too old:

<result>old</result>

If the surl's signature was invalid:

<result>mismatch</result>

POST /oauth/request_token

Get a new request token, bound to a record or carenet if desired.

Short Name:

request_token

Accessible By:

Any user app.

Formdata Parameters:
 
  • indivo_record_id – The record to which to bind the request token. EITHER indivo_record_id or indivo_carenet_id is REQUIRED.
  • indivo_carenet_id – The carenet to which to bind the request token. EITHER indivo_record_id or indivo_carenet_id is REQUIRED.
Returns:

200 OK with the request token on success, 403 Forbidden 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

POST /records/

Create a new record.

Short Name:record_create
Accessible By:Any admin app.
Raw Data:A valid Indivo Contact Document (see Indivo Document Contact Schema).
Returns:200 OK with information about the record on success, 400 Bad Request if the contact XML was empty or invalid.

Example Return Value:

<Record id="123" label="Joe Smith">
  <contact document_id="234" />
  <demographics document_id="" />
</Record>

PUT /records/external/{PRINCIPAL_EMAIL}/{EXTERNAL_ID}

Create a new record with an associated external id.

Short Name:

record_create_ext

Accessible By:

An admin app with an id matching the principal_email in the URL.

URL Parameters:
  • PRINCIPAL_EMAIL – The email with which to scope an external id.
  • EXTERNAL_ID – The external identifier of the desired resource
Raw Data:

A valid Indivo Contact Document (see Indivo Document Contact Schema).

Returns:

200 OK with information about the record on success, 400 Bad Request if the contact XML was empty or invalid.

Example Return Value:

<Record id="123" label="Joe Smith">
  <contact document_id="234" />
  <demographics document_id="" />
</Record>

GET /records/{RECORD_ID}

Get information about an individual record.

Short Name:

record

Accessible By:

A principal in full control of the record, the admin app that created the record, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 OK with information about the record.

Example Return Value:

<Record id="123" label="Joe Smith">
  <contact document_id="234" />
  <demographics document_id="346" />
</Record>

GET /records/{RECORD_ID}/apps/

List userapps bound to a given record.

Short Name:

record_phas

Accessible By:

A principal in full control of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
  • type – A namespaced document type. If specified, only apps which explicitly declare themselves as supporting that document type will be returned.
Returns:

200 OK with a list of userapps.

Example Return Value:

<Apps>
  <App id="problems@apps.indivo.org">
    <startURLTemplate>http://problems.indivo.org/auth/start?record_id={record_id}&amp;carenet_id={carenet_id}</startURLTemplate>
    <name>Problem List</name>
    <description>Managing your problem list</description>
    <autonomous>false</autonomous>
    <frameable>true</frameable>
    <ui>true</ui>
  </App>

  ...

</Apps>

DELETE /records/{RECORD_ID}/apps/{PHA_EMAIL}

Remove a userapp from a record.

Short Name:

pha_record_delete

Accessible By:

Any admin app, or a principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 Success.

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/apps/{PHA_EMAIL}

Get information about a given userapp bound to a record.

Short Name:

record_pha

Accessible By:

A principal in full control of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK with information about the app, or 404 Not Found if the app isn’t bound to the record.

Example Return Value:

<App id="problems@apps.indivo.org">
  <startURLTemplate>http://problems.indivo.org/auth/start?record_id={record_id}&amp;carenet_id={carenet_id}</startURLTemplate>
  <name>Problem List</name>
  <description>Managing your problem list</description>
  <autonomous>false</autonomous>
  <frameable>true</frameable>
  <ui>true</ui>
</App>

PUT /records/{RECORD_ID}/apps/{PHA_EMAIL}

Enable a userapp for a record.

Short Name:

record_pha_enable

Accessible By:

Any admin app, or a principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK on success, 404 Not Found if either the specified record or the specified app doesn’t exist.

Example Return Value:

<ok/>

New in version 1.0.0.


GET /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/

List record-app-specific documents.

Short Name:

record_app_document_list

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Query Parameters:
 
Returns:

200 OK with a list of documents, or 404 Not Found if an invalid type was passed in the querystring.

Example Return Value:

<Documents record_id="123" total_document_count="4" pha="problems@apps.indivo.org">
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading Preferences</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

POST /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/

Create a record-app-specific Indivo document.

Short Name:

record_app_document_create

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create.

Returns:

200 OK with the metadata of the created document, or 400 Bad Request if the new document failed validation.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading Preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

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.

Short Name:

record_app_document_create_or_update_ext

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create/update.

Returns:

200 OK with metadata describing the created or updated document, or 400 Bad Request if the passed content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="problems@apps.indivo.org" type="pha">
  </creator>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

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.

Short Name:

record_app_document_create_or_update_ext

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create/update.

Returns:

200 OK with metadata describing the created or updated document, or 400 Bad Request if the passed content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="problems@apps.indivo.org" type="pha">
  </creator>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

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.

Short Name:

record_app_document_meta_ext

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK with metadata describing the specified document, or http:statuscode:404 if the external_id is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="problems@apps.indivo.org" type="pha">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading Preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

DELETE /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}

Delete a record-app-specific document.

Short Name:

record_app_document_delete

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}

Retrieve a record-app-specific document.

Short Name:

record_app_specific_document

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the raw content of the document, or 404 Not Found if the document could not be found.

Example Return Value:

<ProblemsPreferences record_id="123">
  <Preference name="hide_void" value="true" />
  <Preference name="show_rels" value="false" />
</ProblemsPreferences>

PUT /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/label

Set the label of a record-app-specific document.

Short Name:

record_app_document_label

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The new label for the document

Returns:

200 OK with metadata describing the re-labeled document, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>RELABELED: New HBA1C reading Preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /records/{RECORD_ID}/apps/{PHA_EMAIL}/documents/{DOCUMENT_ID}/meta

Fetch the metadata of a record-app-specific document.

Short Name:

record_app_document_meta

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the document metadata, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading Preferences</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

POST /records/{RECORD_ID}/apps/{PHA_EMAIL}/setup

Bind an app to a record without user authorization.

Short Name:

record_pha_setup

Accessible By:

Any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

Raw content that will be used as a setup document for the record. OPTIONAL.

Returns:

200 OK 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

GET /records/{RECORD_ID}/audits/

Return audits of calls touching record.

Short Name:

audit_record_view

Accessible By:

A principal in full control of the record, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK, with a list of Audit Reports.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
    </Meta>
    <Item>
      <AuditEntry>
        <BasicInfo datetime="2011-04-27T17:32:23Z" view_func="get_document" request_successful="true" />
        <PrincipalInfo effective_principal="myapp@apps.indivoheatlh.org" proxied_principal="me@indivohealth.org" />
        <Resources carenet_id="" record_id="123" pha_id="" document_id="234" external_id="" message_id="" />
        <RequestInfo req_url="/records/123/documents/acd/" req_ip_address="127.0.0.1" req_domain="localhost"  req_method="GET" />
        <ResponseInfo resp_code="200" />
      </AuditEntry>
    </Item>
  </Report>

  ...

</Reports>

Deprecated since version 0.9.3: Use GET /records/{RECORD_ID}/audits/query/ instead.


GET /records/{RECORD_ID}/audits/documents/{DOCUMENT_ID}/

Return audits of calls touching record and document_id.

Short Name:

audit_document_view

Accessible By:

A principal in full control of the record, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Query Parameters:
 
Returns:

200 OK, with a list of Audit Reports.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <Filters>
      <Filter name="document_id" value="234"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
    </Meta>
    <Item>
      <AuditEntry>
        <BasicInfo datetime="2011-04-27T17:32:23Z" view_func="get_document" request_successful="true" />
        <PrincipalInfo effective_principal="myapp@apps.indivoheatlh.org" proxied_principal="me@indivohealth.org" />
        <Resources carenet_id="" record_id="123" pha_id="" document_id="234" external_id="" message_id="" />
        <RequestInfo req_url="/records/123/documents/acd/" req_ip_address="127.0.0.1" req_domain="localhost"  req_method="GET" />
        <ResponseInfo resp_code="200" />
      </AuditEntry>
    </Item>
  </Report>

  ...

</Reports>

Deprecated since version 0.9.3: Use GET /records/{RECORD_ID}/audits/query/ instead.


GET /records/{RECORD_ID}/audits/documents/{DOCUMENT_ID}/functions/{FUNCTION_NAME}/

Return audits of calls to function_name touching record and document_id.

Short Name:

audit_function_view

Accessible By:

A principal in full control of the record, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
  • FUNCTION_NAME – The internal Indivo function name called by the API request
Query Parameters:
 
Returns:

200 OK, with a list of Audit Reports.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <Filters>
      <Filter name="document_id" value="234"/>
      <Filter name="req_view_func" value="record_specific_document"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
    </Meta>
    <Item>
      <AuditEntry>
        <BasicInfo datetime="2011-04-27T17:32:23Z" view_func="get_document" request_successful="true" />
        <PrincipalInfo effective_principal="myapp@apps.indivoheatlh.org" proxied_principal="me@indivohealth.org" />
        <Resources carenet_id="" record_id="123" pha_id="" document_id="234" external_id="" message_id="" />
        <RequestInfo req_url="/records/123/documents/acd/" req_ip_address="127.0.0.1" req_domain="localhost"  req_method="GET" />
        <ResponseInfo resp_code="200" />
      </AuditEntry>
    </Item>
  </Report>

  ...

</Reports>

Deprecated since version 0.9.3: Use GET /records/{RECORD_ID}/audits/query/ instead.


GET /records/{RECORD_ID}/audits/query/

Select Audit Objects via the Query API Interface.

Short Name:

audit_query

Accessible By:

A principal in full control of the record, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of audit records, or 400 Bad Request if any of the arguments to the query interface are invalid.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="created_at*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="document_id" value="234"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
    </Meta>
    <Item>
      <AuditEntry>
        <BasicInfo datetime="2011-04-27T17:32:23Z" view_func="get_document" request_successful="true" />
        <PrincipalInfo effective_principal="myapp@apps.indivoheatlh.org" proxied_principal="me@indivohealth.org" />
        <Resources carenet_id="" record_id="123" pha_id="" document_id="234" external_id="" message_id="" />
        <RequestInfo req_url="/records/123/documents/acd/" req_ip_address="127.0.0.1" req_domain="localhost"  req_method="GET" />
        <ResponseInfo resp_code="200" />
      </AuditEntry>
    </Item>
  </Report>

  ...

</Reports>

New in version 0.9.3.


GET /records/{RECORD_ID}/autoshare/bytype/

For a single record, list all carenets that a given doctype is autoshared with.

Short Name:

autoshare_list

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
  • type – The document schema type to check autoshares for. REQUIRED.
Returns:

200 OK with a list of carenets, or 404 Not Found if the passed document type is invalid.

Example Return Value:

<Carenets record_id="123">
  <Carenet id="789" name="Work/School" mode="explicit" />

  ...

</Carenets>

GET /records/{RECORD_ID}/autoshare/bytype/all

For a single record, list all doctypes autoshared into carenets.

Short Name:

autoshare_list_bytype_all

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 OK with a list of doctypes and their shared carenets.

Example Return Value:

<DocumentSchemas>
  <DocumentSchema type="http://indivo.org/vocab/xml/documents#Medication">
    <Carenet id="123" name="Family" mode="explicit" />

    ...

  </DocumentSchema>

  ...

</DocumentSchemas>

POST /records/{RECORD_ID}/autoshare/carenets/{CARENET_ID}/bytype/set

Automatically share all documents of a certain type into a carenet.

Short Name:

autoshare_create

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CARENET_ID – The id string associated with the Indivo carenet
Formdata Parameters:
 
  • type – the document schema type to create an autoshare for
Returns:

200 OK, or 404 Not Found if the passed document type doesn’t exist.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/autoshare/carenets/{CARENET_ID}/bytype/unset

Remove an autoshare from a carenet.

Short Name:

autoshare_delete

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CARENET_ID – The id string associated with the Indivo carenet
Formdata Parameters:
 
  • type – the document schema type to remove an autoshare for
Returns:

200 OK, or 404 Not Found if the passed document type doesn’t exist.

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/carenets/

List all carenets for a record.

Short Name:

carenet_list

Accessible By:

A principal in full control of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 OK, with a list of carenets.

Example Return Value:

<Carenets record_id="123">
  <Carenet id="789" name="Work/School" mode="explicit" />

  ...

</Carenets>

POST /records/{RECORD_ID}/carenets/

Create a new carenet for a record.

Short Name:

carenet_create

Accessible By:

A principal in full control of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Formdata Parameters:
 
  • name – The label for the new carenet.
Returns:

200 OK with a description of the new carenet, or 400 Bad Request if the name of the carenet wasn’t passed or already exists.

Example Return Value:

<Carenets record_id="123">
  <Carenet id="789" name="Work/School" mode="explicit" />
</Carenets>

DELETE /records/{RECORD_ID}/documents/

Delete all documents associated with a record.

Short Name:

documents_delete

Accessible By:

Nobody

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 Success

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/documents/

List record-specific documents.

Short Name:

record_document_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of documents, or 404 Not Found if an invalid type was passed in the querystring.

Example Return Value:

<Documents record_id="123" total_document_count="4">
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

POST /records/{RECORD_ID}/documents/

Create a record-specific Indivo Document.

Short Name:

document_create

Accessible By:

A user app with access to the record, a principal in full control of the record, or the admin app that created the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Raw Data:

The raw content of the document to create.

Returns:

200 OK with the metadata of the created document, or 400 Bad Request if the new document failed validation.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

PUT /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID}

Create a record-specific Indivo Document with an associated external id.

Short Name:

document_create_by_ext_id

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The raw content of the document to create.

Returns:

200 OK with the metadata of the created document, or 400 Bad Request if the new document failed validation, or if the external id was taken.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

PUT /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID}/label

Set the label of a record-specific document, specified by external id.

Short Name:

record_document_label_ext

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Raw Data:

The new label for the document

Returns:

200 OK with metadata describing the re-labeled document, or 404 Not Found if EXTERNAL_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>RELABELED: New HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /records/{RECORD_ID}/documents/external/{PHA_EMAIL}/{EXTERNAL_ID}/meta

Fetch the metadata of a record-specific document identified by external id.

Short Name:

record_document_meta_ext

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
Returns:

200 OK with the document metadata, or 404 Not Found if EXTERNAL_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /records/{RECORD_ID}/documents/special/{SPECIAL_DOCUMENT}

Read a special document from a record.

Short Name:

read_special_document

Accessible By:

A user app with access to the record, a principal in full control of the record, or the admin app that created the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • SPECIAL_DOCUMENT – The type of special document to access. Options are demographics, contact
Returns:

200 OK with the special document’s raw content, or 404 Not Found if the document hasn’t been created yet.

Example Return Value:

<Contact xmlns="http://indivo.org/vocab/xml/documents#">
    <name>
        <fullName>Sebastian Rockwell Cotour</fullName>
        <givenName>Sebastian</givenName>
        <familyName>Cotour</familyName>
    </name>
    <email type="personal">
        scotour@hotmail.com
    </email>

    <email type="work">
        sebastian.cotour@childrens.harvard.edu
    </email>
    <address type="home">
        <streetAddress>15 Waterhill Ct.</streetAddress>
        <postalCode>53326</postalCode>
        <locality>New Brinswick</locality>
        <region>Montana</region>

        <country>US</country>
        <timeZone>-7GMT</timeZone>
    </address>
    <location type="home">
        <latitude>47N</latitude>
        <longitude>110W</longitude>
    </location>
    <phoneNumber type="home">5212532532</phoneNumber>
    <phoneNumber type="work">6217233734</phoneNumber>
    <instantMessengerName protocol="aim">scotour</instantMessengerName>
</Contact>

POST /records/{RECORD_ID}/documents/special/{SPECIAL_DOCUMENT}

Create or update a special document on a record.

Short Name:

save_special_document

Accessible By:

A user app with access to the record, a principal in full control of the record, or the admin app that created the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • SPECIAL_DOCUMENT – The type of special document to access. Options are demographics, contact
Raw Data:

The raw content of the document to create.

Returns:

200 OK with metadata on the updated document, or 400 Bad Request if the new content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="http://indivo.org/vocab/xml/documents#Contact" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>Contacts</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

PUT /records/{RECORD_ID}/documents/special/{SPECIAL_DOCUMENT}

Create or update a special document on a record.

Short Name:

save_special_document

Accessible By:

A user app with access to the record, a principal in full control of the record, or the admin app that created the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • SPECIAL_DOCUMENT – The type of special document to access. Options are demographics, contact
Raw Data:

The raw content of the document to create.

Returns:

200 OK with metadata on the updated document, or 400 Bad Request if the new content didn’t validate.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="http://indivo.org/vocab/xml/documents#Contact" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>Contacts</label>
  <status>active</status>
  <nevershare>false</nevershare>
</Document>

PUT /records/{RECORD_ID}/documents/{DOCUMENT_ID_0}/rels/{REL}/{DOCUMENT_ID_1}

Create a new relationship between two existing documents.

Short Name:

document_rels

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID_1 – The id of the document that is the subject of the relationship, i.e. DOCUMENT_ID_1 annotates DOCUMENT_ID_0
  • 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
  • REL – The type of relationship between the documents, i.e. annotation, interpretation
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID_0, DOCUMENT_ID_1, or REL don’t exist.

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/documents/{DOCUMENT_ID}

Retrieve a record-specific document.

Short Name:

record_specific_document

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the raw content of the document, or 404 Not Found if the document could not be found.

Example Return Value:

<HBA1C xmlns="http://indivo.org/vocab#" value="5.3" unit="percent" datetime="2011-01-15T17:00:00.000Z" />

GET /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/

List all the carenets into which a document has been shared.

Short Name:

document_carenets

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with a list of carenets.

Example Return Value:

<Carenets record_id="123">
  <Carenet id="789" name="Work/School" mode="explicit" />

  ...

</Carenets>

DELETE /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/{CARENET_ID}

Unshare a document from a given carenet.

Short Name:

carenet_document_delete

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CARENET_ID – The id string associated with the Indivo carenet
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid or if either the passed carenet or document do not belong to the passed record.

Example Return Value:

<ok/>

PUT /records/{RECORD_ID}/documents/{DOCUMENT_ID}/carenets/{CARENET_ID}

Place a document into a given carenet.

Short Name:

carenet_document_placement

Accessible By:

A principal in full control of the carenet’s record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CARENET_ID – The id string associated with the Indivo carenet
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid or nevershared.

Example Return Value:

<ok/>

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.

Short Name:

autoshare_revert

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CARENET_ID – The id string associated with the Indivo carenet
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success.

Example Return Value:

<ok/>

Todo

The API Call ‘POST /records/{0}/documents/{1}/carenets/{2}/autoshare-revert’ is not yet implemented.


PUT /records/{RECORD_ID}/documents/{DOCUMENT_ID}/label

Set the label of a record-specific document.

Short Name:

record_document_label

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The new label for the document

Returns:

200 OK with metadata describing the re-labeled document, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>RELABELED: New HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

GET /records/{RECORD_ID}/documents/{DOCUMENT_ID}/meta

Fetch the metadata of a record-specific document.

Short Name:

record_document_meta

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with the document metadata, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

PUT /records/{RECORD_ID}/documents/{DOCUMENT_ID}/meta

Set metadata fields on a document. NOT IMPLEMENTED.

Short Name:

update_document_meta

Accessible By:

Nobody

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success.

Example Return Value:

<ok/>

Todo

The API Call ‘PUT /records/{0}/documents/{1}/meta’ is not yet implemented.


DELETE /records/{RECORD_ID}/documents/{DOCUMENT_ID}/nevershare

Remove the nevershare flag from a document.

Short Name:

document_remove_nevershare

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<ok/>

PUT /records/{RECORD_ID}/documents/{DOCUMENT_ID}/nevershare

Flag a document to never be shared, anywhere.

Short Name:

document_set_nevershare

Accessible By:

A principal in full control of the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 Success, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<ok/>

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.

Short Name:

get_documents_by_rel

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • REL – The type of relationship between the documents, i.e. annotation, interpretation
  • DOCUMENT_ID – The unique identifier of the Indivo document
Query Parameters:
 
  • status – The account or document status to filter by.
  • limit – See Query Operators. CURRENTLY UNIMPLEMENTED.
  • order_by – See Query Operators. CURRENTLY UNIMPLEMENTED.
  • offset – See Query Operators. CURRENTLY UNIMPLEMENTED
Returns:

200 OK with a list of related documents, or 400 Bad Request if DOCUMENT_ID is invalid.

Example Return Value:

<Documents record_id="123" total_document_count="4">
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

POST /records/{RECORD_ID}/documents/{DOCUMENT_ID}/rels/{REL}/

Create a document and relate it to an existing document.

Short Name:

document_create_by_rel

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • REL – The type of relationship between the documents, i.e. annotation, interpretation
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 Success, 400 Bad Request if the new content was invalid, or 404 Not Found if DOCUMENT_ID or REL are invalid.

Example Return Value:

<ok/>

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.

Short Name:

document_create_by_rel_with_ext_id

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • REL – The type of relationship between the documents, i.e. annotation, interpretation
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 Success, 400 Bad Request if the new content was invalid, or 404 Not Found if DOCUMENT_ID or REL are invalid.

Example Return Value:

<ok/>

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.

Short Name:

document_create_by_rel_with_ext_id

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • REL – The type of relationship between the documents, i.e. annotation, interpretation
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 Success, 400 Bad Request if the new content was invalid, or 404 Not Found if DOCUMENT_ID or REL are invalid.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/documents/{DOCUMENT_ID}/replace

Create a new version of a record-specific document.

Short Name:

document_version

Accessible By:

A user app with access to the record, a principal in full control of the record, or the admin app that created the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 OK with metadata on the new document, 400 Bad Request if the old document has already been replaced by a newer version, or 404 Not Found if DOCUMENT_ID is invalid or if the new content is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <replaces id="abe8130e2-ba54-1234-eeef-45a3b6cd9a8e" />
  <original id="abe8130e2-ba54-1234-eeef-45a3b6cd9a8e" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

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.

Short Name:

document_version_by_ext_id

Accessible By:

A user app with access to the record, with an id matching the app email in the URL.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • EXTERNAL_ID – The external identifier of the desired resource
  • PHA_EMAIL – The email identifier of the Indivo user app
  • DOCUMENT_ID – The unique identifier of the Indivo document
Raw Data:

The raw content of the document to create.

Returns:

200 OK with metadata on the new document, 400 Bad Request if the old document has already been replaced by a newer version, or 404 Not Found if DOCUMENT_ID is invalid or if the new content is invalid.

Example Return Value:

<Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
  <createdAt>2009-05-04T17:05:33</createdAt>
  <creator id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </creator>
  <suppressedAt>2009-05-06T17:05:33</suppressedAt>
  <suppressor id="steve@indivo.org" type="account">
    <fullname>Steve Zabak</fullname>
  </suppressor>
  <replaces id="abe8130e2-ba54-1234-eeef-45a3b6cd9a8e" />
  <original id="abe8130e2-ba54-1234-eeef-45a3b6cd9a8e" />
  <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
  <label>HBA1C reading</label>
  <status>active</status>
  <nevershare>false</nevershare>
  <relatesTo>
    <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
    <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
  </relatesTo>
  <isRelatedFrom>
    <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
  </isRelatedFrom>
</Document>

POST /records/{RECORD_ID}/documents/{DOCUMENT_ID}/set-status

Set the status of a record-specific document.

Short Name:

document_set_status

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Formdata Parameters:
 
  • status – The new status for the document. Options are active, void, archived.
  • reason – The reason for the status change.
Returns:

200 Success, 400 Bad Request if status or reason are missing, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<ok/>

GET /records/{RECORD_ID}/documents/{DOCUMENT_ID}/status-history

List all changes to a document’s status over time.

Short Name:

document_status_history

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Returns:

200 OK with a the document’s status history, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<DocumentStatusHistory document_id="456">
  <DocumentStatus by="joeuser@indivo.example.org" at="2010-09-03T12:45:12Z" status="archived">
    <reason>no longer relevant</reason>
  </DocumentStatus>

  ...

</DocumentStatusHistory>

GET /records/{RECORD_ID}/documents/{DOCUMENT_ID}/versions/

Retrieve the versions of a document.

Short Name:

document_versions

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • DOCUMENT_ID – The unique identifier of the Indivo document
Query Parameters:
 
Returns:

200 OK with a list of document versions, or 404 Not Found if DOCUMENT_ID is invalid.

Example Return Value:

<Documents record_id="123" total_document_count="4">
  <Document id="14c81023-c84f-496d-8b8e-9438280441d3" type="" digest="7e9bc09276e0829374fd810f96ed98d544649703db3a9bc231550a0b0e5bcb1c" size="77">
    <createdAt>2009-05-04T17:05:33</createdAt>
    <creator id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </creator>
    <suppressedAt>2009-05-06T17:05:33</suppressedAt>
    <suppressor id="steve@indivo.org" type="account">
      <fullname>Steve Zabak</fullname>
    </suppressor>
    <original id="14c81023-c84f-496d-8b8e-9438280441d3" />
    <latest id="14c81023-c84f-496d-8b8e-9438280441d3" createdAt="2009-05-05T17:05:33" createdBy="steve@indivo.org" />
    <label>HBA1C reading</label>
    <status>active</status>
    <nevershare>false</nevershare>
    <relatesTo>
      <relation type="http://indivo.org/vocab/documentrels#attachment" count="1" />
      <relation type="http://indivo.org/vocab/documentrels#annotation" count="5" />
    </relatesTo>
    <isRelatedFrom>
      <relation type="http://indivo.org/vocab/documentrels#interpretation" count="1" />
    </isRelatedFrom>
  </Document>

  ...

</Documents>

POST /records/{RECORD_ID}/inbox/{MESSAGE_ID}

Send a message to a record.

Short Name:

record_send_message

Accessible By:

Any admin app, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • MESSAGE_ID – The unique identifier of the Indivo Message
Formdata Parameters:
 
  • body – The message body. Defaults to [no body].
  • body_type – The formatting for the message body. Options are plaintext, markdown. Defaults to plaintext.
  • num_attachments – The number of attachments this message requires. Attachments are uploaded with calls to POST /records/{RECORD_ID}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM}. Defaults to 0.
  • severity – The importance of the message. Options are low, medium, high. Defaults to low.
  • subject – The message subject. Defaults to [no subject].
Returns:

200 Success, or 400 Bad Request if MESSAGE_ID was a duplicate. Also triggers notification emails to accounts authorized to view messages for the passed record.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/inbox/{MESSAGE_ID}/attachments/{ATTACHMENT_NUM}

Attach a document to an Indivo message.

Short Name:

record_message_attach

Accessible By:

Any admin app, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • ATTACHMENT_NUM – The 1-indexed number corresponding to the message attachment
  • MESSAGE_ID – The unique identifier of the Indivo Message
Raw Data:

The raw XML attachment data.

Returns:

200 Success, or 400 Bad Request if ATTACHMENT_NUM has already been uploaded.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/notifications/

Send a notification about a record to all accounts authorized to be notified.

Short Name:

record_notify

Accessible By:

Any admin app, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Formdata Parameters:
 
  • content – The plaintext content of the notification.
  • app_url – A callback url to the app for more information. OPTIONAL.
  • document_id – The id of the document to which this notification pertains. OPTIONAL.
Returns:

200 Success, or 400 Bad Request if content wasn’t passed.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/notify

Send a notification about a record to all accounts authorized to be notified.

Short Name:

record_notify

Accessible By:

Any admin app, or a user app with access to the record.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Formdata Parameters:
 
  • content – The plaintext content of the notification.
  • app_url – A callback url to the app for more information. OPTIONAL.
  • document_id – The id of the document to which this notification pertains. OPTIONAL.
Returns:

200 Success, or 400 Bad Request if content wasn’t passed.

Example Return Value:

<ok/>

Deprecated since version 1.0: Use POST /records/{RECORD_ID}/notifications/ instead.


GET /records/{RECORD_ID}/owner

Get the owner of a record.

Short Name:

record_get_owner

Accessible By:

A principal in full control of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 Success.

Example Return Value:

<Account id='joeuser@example.com' />

POST /records/{RECORD_ID}/owner

Set the owner of a record.

Short Name:

record_set_owner

Accessible By:

Any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Raw Data:

The email address of the new account owner.

Returns:

200 OK with information about the account, or 400 Bad Request if the passed email address is invalid.

Example Return Value:

<Account id="joeuser@indivo.example.org">
  <fullName>Joe User</fullName>
  <contactEmail>joeuser@gmail.com</contactEmail>
  <lastLoginAt>2010-05-04T15:34:23Z</lastLoginAt>
  <totalLoginCount>43</totalLoginCount>
  <failedLoginCount>0</failedLoginCount>
  <state>active</state>
  <lastStateChange>2009-04-03T13:12:12Z</lastStateChange>

  <authSystem name="password" username="joeuser" />
  <authSystem name="hospital_sso" username="Joe_User" />
</Account>

PUT /records/{RECORD_ID}/owner

Set the owner of a record.

Short Name:

record_set_owner

Accessible By:

Any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Raw Data:

The email address of the new account owner.

Returns:

200 OK with information about the account, or 400 Bad Request if the passed email address is invalid.

Example Return Value:

<Account id="joeuser@indivo.example.org">
  <fullName>Joe User</fullName>
  <contactEmail>joeuser@gmail.com</contactEmail>
  <lastLoginAt>2010-05-04T15:34:23Z</lastLoginAt>
  <totalLoginCount>43</totalLoginCount>
  <failedLoginCount>0</failedLoginCount>
  <state>active</state>
  <lastStateChange>2009-04-03T13:12:12Z</lastStateChange>

  <authSystem name="password" username="joeuser" />
  <authSystem name="hospital_sso" username="Joe_User" />
</Account>

GET /records/{RECORD_ID}/reports/experimental/ccr

Export patient data as a Continuity of Care Record (CCR) document.

Short Name:

report_ccr

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 OK with an EXPERIMENTAL CCR document.

Example Return Value:

<ContinuityOfCareRecord xmlns="urn:astm-org:CCR">
  <CCRDocumentObjectID>0</CCRDocumentObjectID>
  <Language>
    <Text>ENGLISH</Text>
  </Language>
  <Version>V1.0</Version>
  <DateTime>
    <Type>
      <Text>Create</Text>
      <ObjectAttribute>
        <Attribute>DisplayDate</Attribute>
        <AttributeValue>
          <Value>09/30/10</Value>
        </AttributeValue>
      </ObjectAttribute>
    </Type>
    <ExactDateTime>2010-05-04T15:34:23Z</ExactDateTime>
  </DateTime>
  <Patient>
    <ActorID>123</ActorID>
  </Patient>
  <From>
    <ActorLink/>
  </From>
  <Body>
    <Medications>
      <Medication>
     <CCRDataObjectID>789</CCRDataObjectID>
     <DateTime>
       <Type>
         <Text>Dispense date</Text>
       </Type>
       <ExactDateTime>2010-05-04T15:34:23Z</ExactDateTime>
     </DateTime>
     <Status>
       <Text>Active</Text>
     </Status>
     <Product>
       <ProductName>
         <Text>Vioxx</Text>
         <Code>
           <Value>C1234</Value>
           <CodingSystem>RxNorm</CodingSystem>
         </Code>
       </ProductName>
       <Strength>
         <Value>20</Value>
         <Units>
           <Unit>mg</Unit>
         </Units>
       </Strength>
     </Product>
     <Directions>
          <Direction>
            <Dose>
              <Value>1</Value>
              <Units>
             <Unit>Pills</Unit>
              </Units>
            </Dose>
            <Route>
              <Text>Oral</Text>
            </Route>
            <Frequency>
              <Value>1QR</Value>
            </Frequency>
          </Direction>
     </Directions>
      </Medication>

      ...

    </Medications>
    <Immunizations>
      <Immunization>
        <CCRDataObjectID>567</CCRDataObjectID>
     <DateTime>
          <Type>
            <Text>Start date</Text>
          </Type>
       <ExactDateTime>2010-05-04T15:34:23Z</ExactDateTime>
     </DateTime>
      <Product>
        <ProductName>
          <Text>Rubella</Text>
          <Code>
            <Value>C1345</Value>
            <CodingSystem>HL7 Vaccines</CodingSystem>
          </Code>
        </ProductName>
      </Product>
      </Immunization>

      ...

    </Immunizations>
    <VitalSigns>

    ...

    </VitalSigns>

    ...

  </Body>
  <Actors>
  </Actors>
</ContinuityOfCareRecord>

GET /records/{RECORD_ID}/reports/minimal/allergies/

List the allergy data for a given record.

Short Name:

allergy_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of allergies, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Allergy xmlns="http://indivo.org/vocab/xml/documents#">
        <dateDiagnosed>2009-05-16</dateDiagnosed>
        <diagnosedBy>Children's Hospital Boston</diagnosedBy>
        <allergen>
          <type type="http://codes.indivo.org/codes/allergentypes/" value="drugs">Drugs</type>
          <name type="http://codes.indivo.org/codes/allergens/" value="penicillin">Penicillin</name>
        </allergen>
        <reaction>blue rash</reaction>
        <specifics>this only happens on weekends</specifics>
      </Allergy>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/equipment/

List the equipment data for a given record.

Short Name:

equipment_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of equipment, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Equipment xmlns="http://indivo.org/vocab/xml/documents#">
        <dateStarted>2009-02-05</dateStarted>
        <dateStopped>2010-06-12</dateStopped>
        <type>cardiac</type>
        <name>Pacemaker</name>
        <vendor>Acme Medical Devices</vendor>
        <id>167-ABC-23</id>
        <description>it works</description>
        <specification>blah blah blah</specification>
      </Equipment>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/immunizations/

List the immunization data for a given record.

Short Name:

immunization_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of immunizations, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="allergen_name" value="penicillin"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Immunization xmlns="http://indivo.org/vocab/xml/documents#">
        <dateAdministered>2009-05-16T12:00:00</dateAdministered>
        <administeredBy>Children's Hospital Boston</administeredBy>
        <vaccine>
          <type type="http://codes.indivo.org/vaccines#" value="hep-B">Hepatitis B</type>
          <manufacturer>Oolong Pharmaceuticals</manufacturer>
          <lot>AZ1234567</lot>
          <expiration>2009-06-01</expiration>
        </vaccine>
        <sequence>2</sequence>
        <anatomicSurface type="http://codes.indivo.org/anatomy/surfaces#" value="shoulder">Shoulder</anatomicSurface>
        <adverseEvent>pain and rash</adverseEvent>
      </Immunization>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/labs/

List the lab data for a given record.

Short Name:

lab_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of labs, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="lab_type" value="hematology"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <LabReport xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>1998-07-16T12:00:00Z</dateMeasured>
        <labType>hematology</labType>
        <laboratory>
          <name>Quest</name>
          <address>300 Longwood Ave, Boston MA 02215</address>
        </laboratory>
        <comments>was looking pretty sick</comments>
        <firstPanelName>CBC</firstPanelName>
      </LabReport>
    </Item>
  </Report>
  <Report>
    <Meta>
      <Document id="1b7270a6-5925-450c-9273-5a74386cef63" type="http://indivo.org/vocab/xml/documents#Lab" size="1653" digest="c1be22813ab83f6b3858878a802f372eef754fcdd285e44a5fdb7387d6ee3667" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="1b7270a6-5925-450c-9273-5a74386cef63"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <LabReport xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-07-16T12:00:00Z</dateMeasured>
        <labType>hematology</labType>
        <laboratory>
          <name>Quest</name>
          <address>300 Longwood Ave, Boston MA 02215</address>
        </laboratory>
        <comments>was looking pretty sick</comments>
        <firstPanelName>CBC</firstPanelName>
      </LabReport>
    </Item>
  </Report>
</Reports>

GET /records/{RECORD_ID}/reports/minimal/measurements/{LAB_CODE}/

List the measurement data for a given record.

Short Name:

measurement_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • LAB_CODE – The identifier corresponding to the measurement being made.
Query Parameters:
 
Returns:

200 OK with a list of measurements, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
      <Filter name="lab_type" value="hematology"/>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Measurement" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Measurement id="1234" value="120" type="blood pressure systolic" datetime="2011-03-02T00:00:00Z" unit="mmHg" source_doc="3456" />
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/medications/

List the medication data for a given record.

Short Name:

medication_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of medications, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Medication" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Medication xmlns="http://indivo.org/vocab/xml/documents#">
        <dateStarted>2009-02-05</dateStarted>
        <name type="http://indivo.org/codes/meds#" abbrev="c2i" value="COX2 Inhibitor" />
        <brandName type="http://indivo.org/codes/meds#" abbrev="vioxx" value="Vioxx" />
        <dose>
          <value>3</value>
          <unit type="http://indivo.org/codes/units#" value="pills" abbrev="p" />
        </dose>
        <route type="http://indivo.org/codes/routes#" value="PO">By Mouth</route>
        <strength>
          <value>100</value>
          <unit type="http://indivo.org/codes/units#" value="mg" abbrev="mg">Milligrams</unit>
        </strength>
        <frequency type="http://indivo.org/codes/frequency#" value="daily">daily</frequency>

        <prescription>
          <by>
            <name>Dr. Ken Mandl</name>
            <institution>Children's Hospital Boston</institution>
          </by>

          <on>2009-02-01</on>
          <stopOn>2010-01-31</stopOn>

          <dispenseAsWritten>true</dispenseAsWritten>

          <!-- this duration means 2 months -->
          <duration>P2M</duration>

          <!-- does this need more structure? -->
          <refillInfo>once a month for 3 months</refillInfo>

          <instructions>don't take them all at once!</instructions>

        </prescription>
      </Medication>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/problems/

List the problem data for a given record.

Short Name:

problem_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of problems, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Problem" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Problem xmlns="http://indivo.org/vocab/xml/documents#">
        <dateOnset>2009-05-16T12:00:00</dateOnset>
        <dateResolution>2009-05-16T16:00:00</dateResolution>
        <name type="http://codes.indivo.org/problems/" value="123" abbrev="MI">Myocardial Infarction</name>
        <comments>mild heart attack</comments>
        <diagnosedBy>Dr. Mandl</diagnosedBy>
      </Problem>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/procedures/

List the procedure data for a given record.

Short Name:

procedure_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of procedures, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#Procedure" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <Procedure xmlns="http://indivo.org/vocab/xml/documents#">
        <datePerformed>2009-05-16T12:00:00</datePerformed>
        <name type="http://codes.indivo.org/procedures#" value="85" abbrev="append">Appendectomy</name>
        <provider>
          <name>Kenneth Mandl</name>
          <institution>Children's Hospital Boston</institution>
        </provider>
      </Procedure>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/simple-clinical-notes/

List the simple_clinical_notes data for a given record.

Short Name:

simple_clinical_notes_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#SimpleClinicalNote" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <SimpleClinicalNote xmlns="http://indivo.org/vocab/xml/documents#">
        <dateOfVisit>2010-02-02T12:00:00Z</dateOfVisit>
        <finalizedAt>2010-02-03T13:12:00Z</finalizedAt>
        <visitType type="http://codes.indivo.org/visit-types#" value="acute">Acute Care</visitType>
        <visitLocation>Longfellow Medical</visitLocation>
        <specialty type="http://codes.indivo.org/specialties#" value="hem-onc">Hematology/Oncology</specialty>

        <signature>
          <at>2010-02-03T13:12:00Z</at>
          <provider>
            <name>Kenneth Mandl</name>
            <institution>Children's Hospital Boston</institution>
          </provider>
        </signature>

        <signature>
          <provider>
            <name>Isaac Kohane</name>
            <institution>Children's Hospital Boston</institution>
          </provider>
        </signature>

        <chiefComplaint>stomach ache</chiefComplaint>
        <content>Patient presents with ... </content>
      </SimpleClinicalNote>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/vitals/

List the vitals data for a given record.

Short Name:

vitals_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#VitalSign" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <VitalSign xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-05-16T15:23:21</dateMeasured>
        <name type="http://codes.indivo.org/vitalsigns/" value="123" abbrev="BPsys">Blood Pressure Systolic</name>
        <value>145</value>
        <unit type="http://codes.indivo.org/units/" value="31" abbrev="mmHg">millimeters of mercury</unit>
        <site>left arm</site>
        <position>sitting down</position>
      </VitalSign>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/reports/minimal/vitals/{CATEGORY}/

List the vitals data for a given record.

Short Name:

vitals_list

Accessible By:

A user app with access to the record, or a principal in full control of the record

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • CATEGORY – The category of vital sign, i.e. weight, Blood_Pressure_Systolic
Query Parameters:
 
Returns:

200 OK with a list of notes, or 400 Bad Request if any invalid query parameters were passed.

Example Return Value:

<Reports xmlns="http://indivo.org/vocab/xml/documents#">
  <Summary total_document_count="2" limit="100" offset="0" order_by="date_measured" />
  <QueryParams>
    <DateRange value="date_measured*1995-03-10T00:00:00Z*" />
    <Filters>
    </Filters>
  </QueryParams>
  <Report>
    <Meta>
      <Document id="261ca370-927f-41af-b001-7b615c7a468e" type="http://indivo.org/vocab/xml/documents#VitalSign" size="1653" digest="0799971784e5a2d199cd6585415a8cd57f7bf9e4f8c8f74ef67a1009a1481cd6" record_id="">
        <createdAt>2011-05-02T17:48:13Z</createdAt>
        <creator id="mymail@mail.ma" type="Account">
          <fullname>full name</fullname>
        </creator>
        <original id="261ca370-927f-41af-b001-7b615c7a468e"/>
        <label>testing</label>
        <status>active</status>
        <nevershare>false</nevershare>
      </Document>
    </Meta>
    <Item>
      <VitalSign xmlns="http://indivo.org/vocab/xml/documents#">
        <dateMeasured>2009-05-16T15:23:21</dateMeasured>
        <name type="http://codes.indivo.org/vitalsigns/" value="123" abbrev="BPsys">Blood Pressure Systolic</name>
        <value>145</value>
        <unit type="http://codes.indivo.org/units/" value="31" abbrev="mmHg">millimeters of mercury</unit>
        <site>left arm</site>
        <position>sitting down</position>
      </VitalSign>
    </Item>
  </Report>

  ...

</Reports>

GET /records/{RECORD_ID}/shares/

List the shares of a record.

Short Name:

record_shares

Accessible By:

The owner of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Returns:

200 OK with a list of shares.

Example Return Value:

<Shares record="123">
  <Share id="678" account="joeuser@example.com" />
  <Share id="789" pha="problems@apps.indivo.org" />

  ...

</Shares>

POST /records/{RECORD_ID}/shares/

Fully share a record with another account.

Short Name:

record_share_add

Accessible By:

The owner of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
Formdata Parameters:
 
  • account_id – The email address of the recipient account. REQUIRED.
  • role_label – A label for the share, usually the relationship between the owner and the recipient (i.e. Guardian). OPTIONAL.
Returns:

200 Success, 400 Bad Request if account_id was not passed, or 404 Not Found if the passed account_id was invalid.

Example Return Value:

<ok/>

DELETE /records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID}

Undo a full record share with an account.

Short Name:

record_share_delete

Accessible By:

The owner of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • OTHER_ACCOUNT_ID – The email identifier of the Indivo account to share with
Returns:

200 Success, or 404 Not Found if OTHER_ACCOUNT_ID is invalid.

Example Return Value:

<ok/>

POST /records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID}/delete

Undo a full record share with an account.

Short Name:

record_share_delete

Accessible By:

The owner of the record, or any admin app.

URL Parameters:
  • RECORD_ID – The id string associated with the Indivo record
  • OTHER_ACCOUNT_ID – The email identifier of the Indivo account to share with
Returns:

200 Success, or 404 Not Found if OTHER_ACCOUNT_ID is invalid.

Example Return Value:

<ok/>

Deprecated since version 1.0: Use DELETE /records/{RECORD_ID}/shares/{OTHER_ACCOUNT_ID} instead.


GET /version

Return the current version of Indivo.

Short Name:get_version
Accessible By:Any principal in Indivo.
Returns:200 OK with the current version of Indivo.

Example Return Value:

1.0.0.0

Project Versions

Previous topic

Indivo API

Next topic

App Size Conventions

This Page