patient

Create a new patient or update an existing patient

put/patient

Request

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

Request body

Example request

{
  "meta": {
    "query": {
      "identifier": {
        "system": "OtherPlace",
        "value": "123456"
      },
      "groups": [
        "5755db2a3db4179179999acf"
      ]
    }
  },
  "data": {
    "type": "patient",
    "attributes": {
      "first_name": "Jack",
      "last_name": "Frost"
    },
    "relationships": {
      "groups": {
        "data": [
          {
            "type": "group",
            "id": "5755db2a3db4179179999acf"
          }
        ]
      }
    }
  }
}

Response

OK

Example response

{
  "meta": {
    "req_id": "5b813ad3-cabc-418f-add4-1e53bc69f7cb"
  },
  "data": {
    "type": "patient",
    "id": "5817ead56f5316c0d05ba8bf",
    "attributes": {
      "first_name": "Jack",
      "last_name": "Frost",
      "updated_at": "2016-11-01T01:07:33.121Z",
      "addresses": [],
      "phone_numbers": [],
      "identifiers": [],
      "archived": false,
      "archive_history": []
    },
    "links": {
      "twine_web_app": "http://10.0.1.55:9000/#/coach/patient/5817ead56f5316c0d05ba8bf",
      "self": "/pub/patient/5817ead56f5316c0d05ba8bf"
    },
    "relationships": {
      "groups": {
        "data": [
          {
            "type": "group",
            "id": "5755db2a3db4179179999acf"
          }
        ],
        "links": {
          "related": "/pub/patient/5817ead56f5316c0d05ba8bf/groups"
        }
      },
      "coaches": {
        "data": [],
        "links": {
          "related": "/pub/patient/5817ead56f5316c0d05ba8bf/coaches"
        }
      }
    }
  },
  "included": []
}

Changes