Getting Patient Information
Often when working with the API you will need to retrieve or create patient identifying information, such as for creating virtual visit or reserving a timeslot.
Getting Current User Patient Information
When the patient information you require is the same as the signed in user, you can get their patientId and additional identifying information through the API simply using the current Auth token.
Endpoint
(Public) Get Patient Information by Auth Token
GET v1/patient
AUTH TOKEN REQUIRED
Responses
Returns a payload of patient personal identifying information (PII) as well as the DexCare patientId (the GUID labeled id
at the top of the response)
{
"id": "74bc4e6f-7602-4f5a-baf1-c48f78a0f4eb",
"links": [
{
"identifiers": [
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "epi"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "mrn"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "INTERNAL"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "EXTERNAL"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "CEID"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "FHIR"
},
{
"system": "org.<healthsystem>.epic.<emr_name>",
"type": "FHIR STU3"
}
],
"birthdate": "1988-10-10",
"gender": "Male",
"name": {
"use": "official",
"family": "LastName",
"given": "FirstName",
"middle": "",
"prefix": "",
"suffix": "",
"displayText": "LastName,FirstName"
},
"ssn": "0000",
"addresses": [
{
"use": "home",
"type": "both",
"line1": "123 Street Ave",
"city": "Everett",
"state": "WA",
"postalCode": "99134",
"country": ""
}
],
"email": "email@email.com",
"homePhone": "232-352-3523",
"workPhone": "232-352-3523",
"mobilePhone": ""
}
],
"identifiers": [
{
"system": "org.<healthsystem>.patients"
}
],
"documents": []
}
- id
- GUID identifying the patient necessary for creating the visit
- addresses, email, homePhone
- information required to create a visit (see below)
Getting a Patient Information When Booking a Visit for Someone Else
It is possible that the current user is acting on behalf of someone else when using APIs to book a visit (i.e. a parent for a child).
In this case, the patient GUID you will use will be one will be that is created or matched by a call to the following endpoint.
Endpoint
(Public) Finds or creates the Electronic Health Record and PatientRecord. Does not link to the Auth account
POST/v1/patient/other
AUTH TOKEN REQUIRED
Parameters
product
identifier related to the client provided by DexCare. It can be used across all get endpoints and indicates which client called the endpoint
type: | query |
default: | N/A |
values: | string |
domain
identifier related to the patient IdP that will be provided by DexCare. The value may vary if there are multiple IdP sources
type: | header |
default: | N/A |
values: | string |
Body Schema
{
"identifiers": [
{
"system": "string",
}
],
"name": {
"family": "string",
"given": "string",
"middle": "string",
"prefix": "string",
"suffix": "string"
},
"email": "user@example.com",
"homePhone": "string",
"workPhone": "string",
"mobilePhone": "string",
"ssn": "string",
"gender": "enum: 'male' | 'female' | 'other' | 'unknown'",
"birthdate": "YYYY-MM-DD",
"addresses": [
{
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postalCode": "string",
"country": "string",
"use": "home",
"type": "both"
}
]
}
The following properties from the above payload are optional:
- workPhone
- mobilePhone
- address.line2
- address.use
- address.type
- identifiers
- identifiers[0].system needs to be set to the ehrSystemName that the patient record should be created in
- gender
- some health systems may not support both
other
andunknown
and would need to use which ever one their system supports - name
- only the properties
given
andfamily
are required - ssn
- last 4 digits of patient’s social security number, not their full ssn. You may also use “0000” for the value
Responses
200
GUID for the newly created other patient
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
400
Bad Request
401
Unauthorized