Name |
Field Name |
Type |
Value |
Description |
Required |
Patient First Name |
name[].given.0 |
- |
- |
First name |
Yes |
Patient Middle Name |
name[].given.1 |
- |
- |
Middle name |
No |
Patient Last Name |
name[].family |
- |
- |
Last name |
Yes |
Patient Birth Date |
birthDate |
- |
eg. 1998-10-10 |
in YYYY-MM-DD format |
Yes |
Gender |
gender |
- |
male | female |
- |
Yes |
Email |
telecom[].value |
- |
test@test.com |
telecom[].system needs to be set to email
telecom[].use needs to be set to home
|
Yes |
Mobile No. |
telecom[].value |
- |
9988776655 |
telecom[].system needs to be set to phone
telecom[].use needs to be set to mobile
|
Yes |
Home Phone No. |
telecom[].value |
- |
3103775842 |
telecom[].system needs to be set to phone
telecom[].use needs to be set to home
|
No |
Address |
address[].line[] |
- |
- |
Street address lines (up to 3 lines) |
Yes |
State |
address[].state |
- |
- |
Province |
Yes |
City |
address[].city |
- |
- |
City |
Yes |
Postal Code |
address[].postalCode |
- |
- |
Zip Code |
Yes |
Country |
address[].country |
- |
US | PH |
2 letter country ode |
Yes |
District |
address[].district |
- |
- |
barangay id |
No |
Profile Photo |
photo[].data |
- |
iVBORw0KGgoAAA... |
base64 format
photo[].contentType needs to be image/png
|
No |
Practitioner 3rd party ID |
identifier[].value |
- |
Unique MWell user ID |
Need to make sure identifier[].system is set to https://www.mwell.com |
No |
Emergency Contact Name |
contact[].name.text |
- |
- |
Emergency Contact Name |
No |
Emergency Relationship |
contact[].relationship[0].text |
- |
- |
Relationship to the patient |
No |
Emergency Contact Email |
contact[].telecom[].value |
- |
- |
Email Address
telecom[].system needs to be set to email
telecom[].use needs to be set to home
|
No |
Emergency Contact Phone |
contact[].telecom[].value |
- |
- |
Phone Number
telecom[].system needs to be set to phone
telecom[].use needs to be set to home
|
No |
Request Type
POST
Request URL
https://test-api.carespan.clinic/R4/Patient
Request Json
{
"identifier": [{
"system": "https://www.mwell.com",
"value": "abc123xyz"
}],
"resourceType": "Patient",
"name": [{
"family": "Anderson",
"given": [
"Sam"
]
}],
"gender": "male",
"birthDate": "1990-01-01",
"telecom": [{
"system": "phone",
"value": "+1 555-370-8810",
"use": "home"
},
{
"system": "phone",
"value": "+1 310-370-8810",
"use": "mobile"
}, {
"system": "email",
"value": "sam.anderson@mwell.com",
"use": "home"
}
],
"address": [{
"line": [
"1046 Kutch Heights Unit 8"
],
"city": "Madison",
"state": "WI",
"postalCode": "53597",
"country": "US"
}],
"contact": [{
"name": {
"text": "Karan Vijay"
},
"relationship": [{
"text": "Spouse"
}],
"telecom": [{
"system": "email",
"value": "test@care.com",
"use": "home"
}, {
"system": "phone",
"value": "+56333333333",
"use": "home"
}],
"address": {
"use": "home",
"type": "physical",
"line": ["Independencia 765, casa 3"],
"city": "Yerbas Buenas",
"district": "Linares",
"country": "Chile"
}
}]
}
Response Json (Success)
{
"id": "GYR2I2D8ZC",
"resourceType": "Patient",
"identifier": [{
"type": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}]
},
"value": "GYR2I2D8ZC"
},
{
"system": "https://www.mwell.com",
"value": "abc123xyz"
}
],
"name": [{
"family": "Anderson",
"given": [
"Sam"
]
}],
"gender": "male",
"birthDate": "1990-01-01",
"address": [{
"line": [
"1046 Kutch Heights Unit 8"
],
"city": "Madison",
"state": "WI",
"postalCode": "53597",
"country": "US"
}],
"telecom": [{
"system": "phone",
"value": "+1 555-370-8810",
"use": "home"
},
{
"system": "phone",
"value": "+1 310-370-8810",
"use": "mobile"
}, {
"system": "email",
"value": "sam.anderson@mwell.com",
"use": "home"
}
],
"contact": [{
"name": {
"text": "Karan Vijay"
},
"relationship": [{
"text": "Spouse"
}],
"telecom": [{
"system": "email",
"value": "test@care.com",
"use": "home"
}, {
"system": "phone",
"value": "+56333333333",
"use": "home"
}],
"address": {
"use": "home",
"type": "physical",
"line": ["Independencia 765, casa 3"],
"city": "Yerbas Buenas",
"district": "Linares",
"country": "Chile"
}
}]
}
Response Json (Similar User Found)
The user is not added
When this happens, we will need to intervene manually. We need to take their IDs and manually check if the users are the same and process separately.
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "warning",
"code": {
"coding": [
{
"coding": "FOUND_SIMILAR_USERS",
"text": "Similer user found"
}
]
},
"diagnostics": "[{\"allMatched\":true,\"matched\":{\"fname\":true,\"lname\":true,\"dob\":true,\"email\":true},\"fields\":{\"id\":\"588\",\"guid\":\"8163090801631163\",\"permission\":\"1\",\"mrn\":\"GYR2I2D8ZC\",\"fname\":\"Sam\",\"lname\":\"Anderson\",\"dob\":\"1990-01-01\",\"email\":\"sam.anderson@mwell.com\",\"role\":\"Patient\"}}]"
}
]
}