Create a Patient
Home » RxWare Developer Site » Invite API » Create a Patient
/v1/patients/invite
Partners can use this API to create a patient object in the RxWare system and/or initiate the patient’s participation in a patient journey flow.
Create patient results in the creation of a patient object on the RxWare database, signified by generating an RxWare system ID (patientId
).
patientId
Example
Example of a patientId
: ha64f9fe4f234fa
Once a user is created in the RxWare system, actions related to each program can be initiated.
For example, an SMS text message may be sent to the patient to invite them to sign a HIPAA consent form, complete a program enrollment, share shipment tracking information, or provide missing information to a hub.
Once a patient starts performing events, such as registering within the platform, a partner can receive status updates via the webhooks mechanism described in another section of this documentation.
In response to creating a patient object via the API, a partner will receive the patientId
to be used for correlation to update patient statuses immediately after creation. It is important to note that a combination of patientId
and supportProgramId
, as well as the partner’s provided externalId
(see table below) will serve as the basis for future actions after initial creation.
Default values:
requiredConsent
– trueisCaregiver
– false
isCaregiver = true
Field | Description | Format & Length | Example | Required? |
---|---|---|---|---|
externalId | The field that the partner uses in their system to identify the user. | String 100 characters | test-user-external-user-id23 | ✅ YES |
phoneNumber | Mobile phone number of user | all country codes and number length per E.164 | +12565551221 | ✅ YES |
supportProgramId | Fixed program ID number used by both Partner and RxWare to properly identify the patient journey for the user. | String 100 characters | b1mTa000dsa54rt | ✅ YES |
firstName | First name of patient associated with the phoneNumber | String, max 100 ASCII 128 | John | ✅ YES |
lastName | Last name of patient associated with the phoneNumber | String, max 100 ASCII 128 | Doe | ✅ YES |
requiredConsent | Flag for consent collection by RxWare : False - Partner has consent and RxWare will not collect it True - Partner does not have consent and RxWare will collect it. | Boolean | true | No |
isCaregiver | Flags the user as a Caregiver, not a patient True - User is a caregiver False - User is a patient Note: If true, key values in additionalData with “Depends*” in required column become required | Boolean | false | No |
skipOnboarding | Flag for completing enrollment True - Partner has all the required enrollment information and no additional information is desired from the user. All enrollment screens will be skipped. False - any required enrollment information missing will be collected during the RxWare enrollment process. Any enrollment information present will be prefilled in the screen, or, if all information on a screen is present, the screen will be skipped. | Boolean | false | No |
additionalData | This field contains the remainder of the enrollment data fields, obtained either through an RxWare experience or a Partner experience. Format: “additionalData”:[“key”:“Name of Field”, “value”: “{{Format Example}}] key is part of the standard format for every enrollment itemName of Field corresponds to the field in the enrollment process of the same namevalue is part of the standard format for every enrollment item{{Format Example}} as provided in this table | array | “additionalData”:[“key”:”patient.first.name”,”John”:] | No |
key.patient.first.name | String, max 100, ASCII 128, the same as firstName. | John | No | |
key.patient.last.name | String, max 100, ASCII 128, the same as lastName. | Doe | No | |
key.patient.dob | yyyy-mm-ddT00:00:00+00:00 | 1987-08-13T00:00:00+00:00 | No | |
key.patient.gender | String, case insensitive, and only "male" or "female". If unsure, don't specify this field at all. | "male" | No | |
key.patient.phone.number | E.164 format | +12565551212 | No | |
key.patient.contact.method | String, case insensitive | "phone" or "email" | No | |
key.patient.prefLanguage | String, max 50, ASCII 128 | "english" | No | |
key.patient.email | String, max 50, ASCII 128 | test@gmail.com | No | |
key.patient.callTime | Communication preference as selected by user, if offered in UX | String, case insensitive | "morning" or "afternoon" | No |
key.caregiver.first.name | String, max 100, ASCII 128 | Jane | Depends* | |
key.caregiver.last.name | String, max 100, ASCII 128 | Doe | Depends* | |
key.caregiver.relationship | String, case insensitive | "Parent" "Legal Guardian" "Power of Attorney" "Spouse" | Depends* | |
key.caregiver.phone.number | Mobile phone number of caregiver | E.164 format | +12567771313 | No |
key.caregiver.email | Email of caregiver | String, max 50, ASCII 128 | test@gmail.com | No |
key.address.street | String, max 50, ASCII 128 | 512 Oak St. | No | |
key.address.apt | String, max 50, ASCII 128 | #15 | No | |
key.address.city | String, max 50, ASCII 128 | Hunstville | No | |
key.address.state | String, max 2 | AL | No | |
key.address.zip | String, max 5 | 35803 | No | |
key.insurance.carrier | Name of primary payer or insurance company of patient | String, max 100, ASCII 128 | Aetna | No |
key.insurance.memberId | Primary Insurance Member ID | String, max 100, ASCII 128 | 5029375829 | No |
key.insurance.groupNum | Primary Insurance Group Number | String, max 100, ASCII 128 | H3569 | No |
key.insurance.cardname | Primary Insurance Name of Patient As Printed on Card | String, max 100, ASCII 128 | Jackie Doe | No |
key.insurance.Dob | Primary Insurance DOB for Cardholder | yyyy-mm-ddT00:00:00+00:00 | 1987-08-13T00:00:00+00:00 | No |
key.insurance.secondary.status | Secondary Insurance Status | String, max 100, ASCII 128 | "active" or "inactive" | No |
key.insurance.secondary.carrier | Provide only if insurance.secondary.status is active | String, max 100, ASCII 128 | Blue Cross | No |
key.insurance.secondary.memberid | Provide only if insurance.secondary.status is active | String, max 100, ASCII 128 | 78933678 | No |
key.insurance.secondary.groupNum | Provide only if insurance.secondary.status is active | String, max 100, ASCII 128 | K8967 | No |
key.insurance.secondary.cardname | Provide only if insurance.secondary.status is active | String, max 100, ASCII 128 | Jackie Doe | No |
key.insurance.secondary.cardDob | Provide only if insurance.secondary.status is active | String, max 100, ASCII 128 | 1987-08-13T00:00:00+00:00 | No |
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. |