EXAMPLE: Create Patient
Home ยป RxWare Developer Site ยป Invite API ยป EXAMPLE: Create Patient
ENDPOINT: POST
/v1/patients/invite
Below is an example JSON call of how to create a new patient in the system using the Invite API.
Heads Up:
You will need to add your own variables to anything in
{{double brackets}}
.
As an example,
{{test-user-external-user-id}}
would be swapped out with something of your choosing, like "test-user-id-123"
:
{
"externalId": "{{test-user-external-user-id}}",
"phoneNumber": "{{test-user-phone-number}}",
"supportProgramId": "{{partners-support-program-id}}",
"firstName": "{{test-user-first-name}}",
"lastName": "{{test-user-last-name}}",
"requiredConsent": false,
"isCaregiver": true,
"skipOnboarding": false,
"additionalData": [
{
"key": "patient.first.name",
"value": "{{test-user-first-name}}",
"editable": false
},
{
"key": "patient.last.name",
"value": "{{test-user-last-name}}",
"editable": false
},
{
"key": "patient.dob",
"value": "1988-08-23T00:00:00+00:00",
"editable": true
},
{
"key": "patient.gender",
"value": "male",
"editable": true
},
{
"key": "patient.phone.number",
"value": "+12029999999",
"editable": false
},
{
"key": "patient.contact.method",
"value": "Phone",
"editable": true
},
{
"key": "patient.prefLanguage",
"value": "English",
"editable": true
},
{
"key": "patient.email",
"value": "test@gmail.com",
"editable": true
},
{
"key": "patient.callTime",
"value": "Morning",
"editable": true
},
{
"key": "caregiver.first.name",
"value": "test",
"editable": true
},
{
"key": "caregiver.last.name",
"value": "test",
"editable": true
},
{
"key": "caregiver.relationship",
"value": "Parent",
"editable": true
},
{
"key": "caregiver.phone.number",
"value": "+12099999999",
"editable": true
},
{
"key": "caregiver.email",
"value": "test@gmail.com",
"editable": true
},
{
"key": "address.street",
"value": "test",
"editable": true
},
{
"key": "address.apt",
"value": "12",
"editable": true
},
{
"key": "address.city",
"value": "test",
"editable": true
},
{
"key": "address.state",
"value": "AL",
"editable": true
},
{
"key": "address.zip",
"value": "12345",
"editable": true
},
{
"key": "insurance.carrier",
"value": "test",
"editable": true
},
{
"key": "insurance.memberId",
"value": "123",
"editable": true
},
{
"key": "insurance.groupNum",
"value": "ds43",
"editable": true
},
{
"key": "insurance.cardname",
"value": "test",
"editable": true
},
{
"key": "insurance.cardDob",
"value": "2020-08-23T06:25:00+00:00",
"editable": true
},
{
"key": "insurance.secondary.status",
"value": "active",
"editable": true
},
{
"key": "insurance.secondary.carrier",
"value": "test2",
"editable": true
},
{
"key": "insurance.secondary.memberid",
"value": "234234",
"editable": true
},
{
"key": "insurance.secondary.groupNum",
"value": "hg89",
"editable": true
},
{
"key": "insurance.secondary.cardname",
"value": "test2",
"editable": true
},
{
"key": "insurance.secondary.cardDob",
"value": "2020-08-23T06:25:00+00:00",
"editable": true
}
]
}
Standard HTTP Response Codes
Status | Code | Message | Description |
---|---|---|---|
200 | N/A | { | Patient successfully created in the RxWare system and responds with a patientId |
400 | 1004 | Support program with id: {{support_program_id}} not found | Invalid Support Program ID was submitted. |
400 | 1008 | The property supportProgramId is required | Invalid Support Program ID was submitted. |
400 | 0 | The given data was invalid. Can't invite patients less than 18 independently. | Patient is under 18, must include a Caregiver in the request. |
400 | 0 | The given data was invalid. Caregiver name and relationship are required in this case. | Please include the Caregiver name and their relationship to the patient. |
400 | 0 | The given data was invalid. The phone number in the invite request is not aligned with the caregiver's phone number and the patient is less than 18 years. | |
400 | 1008 | patient.phoneNumber is not valid format. | Please resubmit the patient.phoneNumber using the E.164 format |
400 | 1008 | Does not match the regex pattern (^\+\d{11}$)|(^\+\d{12}$) | Please resubmit the patient.phoneNumber using the E.164 format |
400 | 1002 | patient.dob is not valid format. | Please resubmit the patient.dob using a valid format.Example: 1988-08-23T00:00:00+00:00 |
400 | 1005 | JWT is not valid for this program | Check your bearer token and resubmit the request. |
400 | 1006 | Token disabled | Please reach out to support@rxware.io to request a new token. |
400 | 1010 | The given data was invalid. The phone number in the invite request is not aligned with the caregiver's phone number and the patient is less than 18 years. | The caregiver's phone number does not match what was submitted in the request and the patient is less than 18 years of age. |
401 | 0 | Unauthorized | Incorrect credentials. Check your auth token and bearer token. |
403 | N/A | Forbidden | Incorrect credentials. Check your auth token and bearer token. |
422 | 1015 | { | Patient already invited/created in the RxWare system. |