Mutations
Create a new patient, anonymous patients are also supported.
In order to make sure you there's only one single reference to each unique patient, we advise you to first search whether the patient already exists (see "searchPatient" queries).
In order to establish a link between the patient resource on your end and the patient resource in Awell, we advise you to store the identifier of the patient resource in your system in the patient_code
field. This way its easy to establish a link between the patient record in your system and in Awell's system.
- graphql
01mutation CreatePatient($input: CreatePatientInput!) {02 createPatient(input: $input) {03 patient {04 id05 }06 }07}
In case you want to create anonymous patients without any PHI, we still advise you to specify a patient_code
where you can insert the internal identifier of the patient. This can later be used to reconcile the Awell patient resource with a patient resource in your system.
- json
01{02 "input": {03 "patient_code": "{{YOUR_INTERNAL_PATIENT_IDENTIFIER}}" // recommended04 }05}
Use our GraphQL explorer to discover all the variables you can pass with this mutation.
- json
01{02 "input": {03 "patient_code": "{{YOUR_INTERNAL_PATIENT_IDENTIFIER}}",04 "first_name": "{{PATIENT_FIRST_NAME}}",05 "last_name": "{{PATIENT_LAST_NAME}}"06 }07}
Languages should be passed as an ISO 639-1 shortcode.
- json
01{02 "input": {03 "preferred_language": "en"04 }05}
Phone numbers should be passed in the E.164 format. Read more here.
- json
01{02 "input": {03 "mobile_phone": "+16175551212",04 "phone": "+16175551212" // Landline05 }06}