patient

Get a list of patients.

get/patient

Request

  • Base URL
    https://api.twinehealth.com/pub
  • Auth
    none declared

Query parameters

filter[groups]string

Comma-separated list of group ids. Note that either filter[group] or filter[organization] must be specified.

filter[organization]string

Fitbit Plus organization id. Note that either filter[group] or filter[organization] must be specified.

filter[identifier][system]string

Identifier system (example: "MyEHR") - requires a "filter[identifier][value]" parameter

filter[identifier][value]string

Identifier value (example: "12345") - requires a "filter[identifier][system]" parameter

filter[archived]boolean

If not specified, return all patients. If set to 'true' return only archived patients, if set to 'false', return only patients who are not archived.

filter[created_at]string

The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by ... Example for patients created in November 2017 (America/New_York): filter[created_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00

filter[updated_at]string

The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by ... Example for patients updated in November 2017 (America/New_York): filter[updated_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00

page[number]integer

Page number

page[size]integer

Page size

page[limit]integer

Page limit

page[cursor]string

Page cursor

Response

OK

Example response

{
  "meta": {
    "req_id": "155c690b-50b2-4ff2-8abe-b809a8a51e53",
    "count": 263
  },
  "links": {
    "self": "/pub/patient?filter[groups]=5755db2a3db4179179999acf&page[number]=1&page[size]=3",
    "next": "/pub/patient?filter[groups]=5755db2a3db4179179999acf&page[number]=2&page[size]=3",
    "last": "/pub/patient?filter[groups]=5755db2a3db4179179999acf&page[number]=88&page[size]=3"
  },
  "data": [
    {
      "type": "patient",
      "id": "58163112237d84a94035f78b",
      "attributes": {
        "first_name": "Lucy",
        "last_name": "Bernhard",
        "updated_at": "2016-03-16T13:32:57.000Z",
        "birth_date": "1938-10-04",
        "addresses": [],
        "phone_numbers": [
          {
            "primary": true,
            "value": "880-136-7979 x6183"
          },
          {
            "primary": false,
            "value": "919.814.3552 x40123"
          }
        ],
        "identifiers": [
          {
            "label": "Fitbit Plus Sample Data Filler Patient",
            "system": "twine-filler-patient",
            "value": "filler-92"
          }
        ],
        "archived": false,
        "archive_history": [],
        "statement": {
          "value": "Enjoying nature.",
          "updated_at": "2016-03-16T13:32:57.000Z",
          "updated_by": "5c509cc2f60e34018180b57c"
        }
      },
      "links": {
        "twine_web_app": "http://10.0.1.55:9000/#/coach/admin/coaches/58163112237d84a94035f78b/profile",
        "self": "/pub/patient/58163112237d84a94035f78b"
      },
      "relationships": {
        "groups": {
          "data": [
            {
              "type": "group",
              "id": "5755db2a3db4179179999acf"
            }
          ],
          "links": {
            "related": "/pub/patient/58163112237d84a94035f78b/groups"
          }
        },
        "coaches": {
          "data": [
            {
              "type": "coach",
              "id": "581630c3237d84a9403533c6",
              "meta": {
                "primary": true
              }
            }
          ],
          "links": {
            "related": "/pub/patient/58163112237d84a94035f78b/coaches"
          }
        }
      }
    },
    {
      "type": "patient",
      "id": "58163103237d84a94035f0b3",
      "attributes": {
        "first_name": "Annette",
        "last_name": "Parisian",
        "updated_at": "2016-02-04T12:55:03.000Z",
        "email_address": "annette.parisian@example.com",
        "birth_date": "1983-03-16",
        "addresses": [],
        "phone_numbers": [
          {
            "primary": true,
            "value": "044.758.5704 x1965"
          }
        ],
        "identifiers": [
          {
            "label": "Fitbit Plus Sample Data Filler Patient",
            "system": "twine-filler-patient",
            "value": "filler-5"
          }
        ]
      },
      "links": {
        "twine_web_app": "http://10.0.1.55:9000/#/coach/admin/coaches/58163103237d84a94035f0b3/profile",
        "self": "/pub/patient/58163103237d84a94035f0b3"
      },
      "relationships": {
        "groups": {
          "data": [
            {
              "type": "group",
              "id": "5755db2a3db4179179999acf"
            }
          ],
          "links": {
            "related": "/pub/patient/58163103237d84a94035f0b3/groups"
          }
        },
        "coaches": {
          "data": [
            {
              "type": "coach",
              "id": "581630c3237d84a9403533c6",
              "meta": {
                "primary": true
              }
            }
          ],
          "links": {
            "related": "/pub/patient/58163103237d84a94035f0b3/coaches"
          }
        }
      }
    },
    {
      "type": "patient",
      "id": "58163103237d84a94035f043",
      "attributes": {
        "first_name": "Lexi",
        "last_name": "Thompson",
        "updated_at": "2016-01-23T16:12:07.000Z",
        "email_address": "lexi.thompson@example.com",
        "birth_date": "1932-04-06",
        "addresses": [],
        "phone_numbers": [
          {
            "primary": true,
            "value": "1-977-830-6179 x26334"
          }
        ],
        "identifiers": [
          {
            "label": "Fitbit Plus Sample Data Filler Patient",
            "system": "twine-filler-patient",
            "value": "filler-3"
          }
        ]
      },
      "links": {
        "twine_web_app": "http://10.0.1.55:9000/#/coach/admin/coaches/58163103237d84a94035f043/profile",
        "self": "/pub/patient/58163103237d84a94035f043"
      },
      "relationships": {
        "groups": {
          "data": [
            {
              "type": "group",
              "id": "5755db2a3db4179179999acf"
            }
          ],
          "links": {
            "related": "/pub/patient/58163103237d84a94035f043/groups"
          }
        },
        "coaches": {
          "data": [
            {
              "type": "coach",
              "id": "581630c3237d84a9403533c6",
              "meta": {
                "primary": true
              }
            }
          ],
          "links": {
            "related": "/pub/patient/58163103237d84a94035f043/coaches"
          }
        }
      }
    }
  ]
}

Changes

    • info

      added the new optional query request parameter page[cursor]

    • info

      added the new optional query request parameter page[limit]

    • info

      added the new optional query request parameter filter[created_at]

    • info

      added the new optional query request parameter filter[updated_at]