Semble GraphQL API Reference
Welcome to the Semble GraphQL API!
Terms of Service
API Endpoints
https://open.semble.io/graphql
Version
1.0.0
What is GraphQL?
GraphQL is a query language for APIs that allows clients to request exactly the data they need, making it possible to get all required data in a limited number of requests.
The GraphQL data (fields) can be described in the form of types, allowing clients to use client-side GraphQL libraries to consume the API and avoid manual parsing.
Since there’s no fixed endpoints and data model, new abilities can be added to the API without creating breaking changes. This allows us to have a versionless API as described in the GraphQL documentation.
Authentication
You will need to generate a token to use the API. A token is valid for 12 hours. You can request a token by using the singIn
mutation.
Example
curl --request POST
--url https://open.semble.io/graphql
--header 'content-type: application/json'
--data '{"query":"mutation {\n signIn (apiKey: \"API_KEY\", password: \"ACCOUNT_PASSWORD\")\n {\n token\n }\n}"}'
Assuming that API_KEY and ACCOUNT_PASSWORD are correct, the following response will be returned:
{
"data": {
"signIn": {
"token": TOKEN_ID
}
}
}
Authenticated requests
To use the token you will need to include "x-token: YOUR_TOKEN"
in a header
Example
curl --request POST
--url https://open.semble.io/graphql
--header 'x-token: TOKEN_ID
--data '{...}'
Queries
accountStatement
Description
This query is for fetching a specific financial AccountStatement by it's unique idenfier.
Response
Returns an
AccountStatement
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
query accountStatement($id: ID!) {
accountStatement(id: $id) {
id
statementType
date
start
end
header
accountReferenceNumber
comments
account {
... on Patient {
...PatientFragment
}
... on Contact {
...ContactFragment
}
}
invoices {
...InvoiceFragment
}
totalPaid
totalPrice
totalOutstanding
createdAt
updatedAt
deleted
}
}
Variables
{"id": "4"}
Response
{
"data": {
"accountStatement": {
"id": "4",
"statementType": "ACTIVITY",
"date": "2007-12-03",
"start": "2007-12-03",
"end": "2007-12-03",
"header": "abc123",
"accountReferenceNumber": "abc123",
"comments": "abc123",
"account": Patient,
"invoices": [Invoice],
"totalPaid": 123.45,
"totalPrice": 123.45,
"totalOutstanding": 123.45,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03",
"deleted": true
}
}
}
accountStatements
Description
This query is for fetching a collection of AccountStatements within the given DateRange.
Response
Returns an
AccountStatementData
Arguments
Name | Description |
---|---|
dateRange -
DateRange!
|
|
pagination -
CursorPagination
|
|
options -
QueryOptions
|
Example
Query
query accountStatements(
$dateRange: DateRange!,
$pagination: CursorPagination,
$options: QueryOptions
) {
accountStatements(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...AccountStatementFragment
}
pageInfo {
...PageInfoForCursorPaginationFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": CursorPagination,
"options": QueryOptions
}
Response
{
"data": {
"accountStatements": {
"data": [AccountStatement],
"pageInfo": PageInfoForCursorPagination
}
}
}
availabilities
Description
Fetches a collection of all
Availabilities
held by a
Practice Location
.
Response
Returns an
AvailabilityData
Arguments
Name | Description |
---|---|
dateRange -
DateRange!
|
This range can include up to equivalent of 7 days in hours / 168 hours. |
locationId -
ID!
|
The ID of the
Practice Location . |
doctorId -
ID
|
If specified, returns only the availabilities of the specific
doctor for this
Practice Location . If unspecified, returns all availabilities associated with the
Practice Location . To consider the availabilities of multiple doctors multiple queries will be required. |
Example
Query
query availabilities(
$dateRange: DateRange!,
$locationId: ID!,
$doctorId: ID
) {
availabilities(
dateRange: $dateRange,
locationId: $locationId,
doctorId: $doctorId
) {
data {
...AvailabilityFragment
}
}
}
Variables
{"dateRange": DateRange, "locationId": 4, "doctorId": 4}
Response
{"data": {"availabilities": {"data": [Availability]}}}
bookings
Description
This query is for fetching data about patient bookings held in the system.
Response
Returns a
BookingData
Arguments
Name | Description |
---|---|
dateRange -
DateRange
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query bookings(
$dateRange: DateRange,
$pagination: Pagination,
$options: QueryOptions
) {
bookings(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...BookingFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"bookings": {
"data": [Booking],
"pageInfo": PageInfo
}
}
}
contact
Description
This query fetches the contact with the specified identifier.
Example
Query
query contact($id: ID!) {
contact(id: $id) {
id
title
status
firstName
lastName
fullName
email
phones {
...PhoneFragment
}
address {
...AddressFragment
}
numbers {
...PatientNumberFragment
}
medicalSpecialty
company
createdAt
updatedAt
}
}
Variables
{"id": 4}
Response
{
"data": {
"contact": {
"id": 4,
"title": "xyz789",
"status": "xyz789",
"firstName": "xyz789",
"lastName": "abc123",
"fullName": "abc123",
"email": "abc123",
"phones": [Phone],
"address": Address,
"numbers": [PatientNumber],
"medicalSpecialty": "xyz789",
"company": "abc123",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
contacts
Description
This query fetches a collection of contacts that match the requested search text. The requested search text is compared against the contacts name, email address, telephone number(s), medical specialisation and numbers (such as NHS Number).
Response
Returns a
ContactData
Arguments
Name | Description |
---|---|
search -
String
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query contacts(
$search: String,
$pagination: Pagination,
$options: QueryOptions
) {
contacts(
search: $search,
pagination: $pagination,
options: $options
) {
data {
...ContactFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"search": "abc123",
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"contacts": {
"data": [Contact],
"pageInfo": PageInfo
}
}
}
invoice
Description
This query fetches the invoice with the specified identifier.
Example
Query
query invoice($id: ID!) {
invoice(id: $id) {
id
status
paidOrOutstanding
invoiceNumber
paymentReference
date
patientId
patient {
...PatientFragment
}
payeeDetails
doctorId
doctor {
...UserFragment
}
location
lineItems {
...LineItemFragment
}
payments {
...InvoicePaymentFragment
}
tax
total
outstanding
comments
extraInfo
type
createdAt
updatedAt
}
}
Variables
{"id": "4"}
Response
{
"data": {
"invoice": {
"id": "4",
"status": "xyz789",
"paidOrOutstanding": "xyz789",
"invoiceNumber": 987,
"paymentReference": "abc123",
"date": "2007-12-03",
"patientId": "4",
"patient": Patient,
"payeeDetails": "xyz789",
"doctorId": 4,
"doctor": User,
"location": "abc123",
"lineItems": [LineItem],
"payments": [InvoicePayment],
"tax": 123.45,
"total": 987.65,
"outstanding": 123.45,
"comments": "abc123",
"extraInfo": "xyz789",
"type": "abc123",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
invoices
Description
This query fetches a collection of invoices where the invoice date falls within the requested range. The query can be further refined through the use of QueryOptions to only fetch invoices that were created or modified (or both) within specified dates.
Response
Returns an
InvoiceData
Arguments
Name | Description |
---|---|
dateRange -
DateRange!
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query invoices(
$dateRange: DateRange!,
$pagination: Pagination,
$options: QueryOptions
) {
invoices(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...InvoiceFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"invoices": {
"data": [Invoice],
"pageInfo": PageInfo
}
}
}
lab
Description
This query fetches the pathology request with the specified identifier.
Example
Query
query lab($id: ID!) {
lab(id: $id) {
id
status
patient {
...PatientFragment
}
doctor {
...UserFragment
}
requestDate
sampleDate
fasting
orderNumber
parsedResults
resultsReceivedAt
testList
createdAt
updatedAt
}
}
Variables
{"id": "4"}
Response
{
"data": {
"lab": {
"id": 4,
"status": "abc123",
"patient": Patient,
"doctor": User,
"requestDate": "2007-12-03",
"sampleDate": "2007-12-03",
"fasting": false,
"orderNumber": "xyz789",
"parsedResults": "abc123",
"resultsReceivedAt": "2007-12-03",
"testList": "xyz789",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
labels
Description
This query is for fetching label data.
Response
Returns a
LabelData
Arguments
Name | Description |
---|---|
pagination -
Pagination
|
Example
Query
query labels($pagination: Pagination) {
labels(pagination: $pagination) {
data {
...LabelFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"pagination": Pagination}
Response
{
"data": {
"labels": {
"data": [Label],
"pageInfo": PageInfo
}
}
}
labs
Description
This query fetches a collection of pathology requests that where submitted to the processing lab within the specified date range. The collection can be furter refined through the use of LabQueryOptions.
Response
Returns a
LabData
Arguments
Name | Description |
---|---|
dateRange -
DateRange!
|
|
pagination -
Pagination
|
|
options -
LabQueryOptions
|
Example
Query
query labs(
$dateRange: DateRange!,
$pagination: Pagination,
$options: LabQueryOptions
) {
labs(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...LabFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": LabQueryOptions
}
Response
{
"data": {
"labs": {
"data": [Lab],
"pageInfo": PageInfo
}
}
}
letter
Description
This query is for fetching the letter with the specified identifier.
Example
Query
query letter($id: ID!) {
letter(id: $id) {
id
deleted
reviewStatus
patient {
...PatientFragment
}
doctor {
...UserFragment
}
date
title
body
contact {
...LetterContactFragment
}
createdAt
updatedAt
}
}
Variables
{"id": "4"}
Response
{
"data": {
"letter": {
"id": 4,
"deleted": false,
"reviewStatus": "NONE",
"patient": Patient,
"doctor": User,
"date": "2007-12-03",
"title": "abc123",
"body": "xyz789",
"contact": LetterContact,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
letters
Description
This query fetches the letters created? sent? written? posted? read? what? within the specified DateRange.
Response
Returns a
LetterData
Arguments
Name | Description |
---|---|
dateRange -
DateRange!
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query letters(
$dateRange: DateRange!,
$pagination: Pagination,
$options: QueryOptions
) {
letters(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...LetterFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"letters": {
"data": [Letter],
"pageInfo": PageInfo
}
}
}
patient
Description
This query fetches patient data for the patient with the specified identifier.
Example
Query
query patient($id: ID!) {
patient(id: $id) {
id
title
status
firstName
lastName
fullName
dob
gender
sex
email
googleClientId
paymentReference
phones {
...PhoneFragment
}
occupation
address {
...AddressFragment
}
membershipName
membershipStartDate
sharingToken {
...SharingTokenFragment
}
numbers {
...PatientNumberFragment
}
customAttributes {
...CustomAttributeFragment
}
communicationPreferences {
...CommunicationPreferencesFragment
}
relatedAccounts {
...PatientRelationshipFragment
}
bookings {
...BookingFragment
}
invoices {
...InvoiceFragment
}
letters {
...LetterFragment
}
labs {
...LabFragment
}
labels {
...PatientLabelFragment
}
prescriptions {
...PrescriptionDataFragment
}
records {
...RecordDataFragment
}
createdAt
updatedAt
accessGroups {
...PatientAccessGroupFragment
}
}
}
Variables
{"id": 4}
Response
{
"data": {
"patient": {
"id": 4,
"title": "abc123",
"status": "xyz789",
"firstName": "xyz789",
"lastName": "xyz789",
"fullName": "abc123",
"dob": "2007-12-03",
"gender": "abc123",
"sex": "abc123",
"email": "abc123",
"googleClientId": "abc123",
"paymentReference": "abc123",
"phones": [Phone],
"occupation": "xyz789",
"address": Address,
"membershipName": "xyz789",
"membershipStartDate": "xyz789",
"sharingToken": SharingToken,
"numbers": [PatientNumber],
"customAttributes": [CustomAttribute],
"communicationPreferences": CommunicationPreferences,
"relatedAccounts": [PatientRelationship],
"bookings": [Booking],
"invoices": [Invoice],
"letters": [Letter],
"labs": [Lab],
"labels": [PatientLabel],
"prescriptions": PrescriptionData,
"records": RecordData,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03",
"accessGroups": [PatientAccessGroup]
}
}
}
patientDocument
Description
This query fetches the patient document with the requested identifier.
Response
Returns a
PatientDocument
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
query patientDocument($id: ID!) {
patientDocument(id: $id) {
id
title
patientId
patient {
...PatientFragment
}
path
name
type
url
parent
deleted
dateCreated
dateModified
uploadUrl
downloadUrl
}
}
Variables
{"id": 4}
Response
{
"data": {
"patientDocument": {
"id": "4",
"title": "xyz789",
"patientId": 4,
"patient": Patient,
"path": "abc123",
"name": "xyz789",
"type": "abc123",
"url": "xyz789",
"parent": "4",
"deleted": false,
"dateCreated": "2007-12-03",
"dateModified": "2007-12-03",
"uploadUrl": "xyz789",
"downloadUrl": "xyz789"
}
}
}
patientDocuments
Description
This query fetches a collection of patient documents held in the system.
Response
Returns a
PatientDocumentData
Arguments
Name | Description |
---|---|
search -
String
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query patientDocuments(
$search: String,
$pagination: Pagination,
$options: QueryOptions
) {
patientDocuments(
search: $search,
pagination: $pagination,
options: $options
) {
data {
...PatientDocumentFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"search": "xyz789",
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"patientDocuments": {
"data": [PatientDocument],
"pageInfo": PageInfo
}
}
}
patientRelationships
Description
Fetches a collection of all
PatientRelationships
held by a
Patient
.
Response
Returns a
PatientRelationshipData
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
relationshipType -
PatientRelationshipType
|
If specified, only
PatientRelationships with the chosen
PatientRelationshipType will be returned |
Example
Query
query patientRelationships(
$patientId: ID!,
$relationshipType: PatientRelationshipType
) {
patientRelationships(
patientId: $patientId,
relationshipType: $relationshipType
) {
data {
...PatientRelationshipFragment
}
}
}
Variables
{"patientId": 4, "relationshipType": "FAMILY"}
Response
{
"data": {
"patientRelationships": {
"data": [PatientRelationship]
}
}
}
patients
Description
This query fetches a collection of patients that match the supplied search criteria.
Response
Returns a
PatientData
Arguments
Name | Description |
---|---|
search -
String
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query patients(
$search: String,
$pagination: Pagination,
$options: QueryOptions
) {
patients(
search: $search,
pagination: $pagination,
options: $options
) {
data {
...PatientFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"search": "abc123",
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"patients": {
"data": [Patient],
"pageInfo": PageInfo
}
}
}
practice
Description
This query returns the current API user's practice.
Response
Returns a
Practice!
Example
Query
query practice {
practice {
id
locations {
...PracticeLocationFragment
}
appointmentTypes {
...AppointmentTypeFragment
}
paymentTypes {
...PracticePaymentTypeFragment
}
accessGroups {
...PracticeAccessGroupsFragment
}
practiceNumbers {
...PracticeNumbersFragment
}
}
}
Response
{
"data": {
"practice": {
"id": "4",
"locations": [PracticeLocation],
"appointmentTypes": [AppointmentType],
"paymentTypes": [PracticePaymentType],
"accessGroups": [PracticeAccessGroups],
"practiceNumbers": [PracticeNumbers]
}
}
}
practiceTemplateDocument
Description
This query fetches the document template with the requested identifier.
Response
Returns a
PracticeTemplateDocument
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
query practiceTemplateDocument($id: ID!) {
practiceTemplateDocument(id: $id) {
id
patientId
path
name
type
url
deleted
dateCreated
dateModified
uploadUrl
downloadUrl
}
}
Variables
{"id": 4}
Response
{
"data": {
"practiceTemplateDocument": {
"id": "4",
"patientId": "4",
"path": "abc123",
"name": "xyz789",
"type": "xyz789",
"url": "xyz789",
"deleted": true,
"dateCreated": "2007-12-03",
"dateModified": "2007-12-03",
"uploadUrl": "abc123",
"downloadUrl": "abc123"
}
}
}
practiceTemplateDocuments
Description
This query fetches a collection of document templates.
Response
Returns a
PracticeTemplateDocumentData
Arguments
Name | Description |
---|---|
search -
String
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query practiceTemplateDocuments(
$search: String,
$pagination: Pagination,
$options: QueryOptions
) {
practiceTemplateDocuments(
search: $search,
pagination: $pagination,
options: $options
) {
data {
...PracticeTemplateDocumentFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"search": "xyz789",
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"practiceTemplateDocuments": {
"data": [PracticeTemplateDocument],
"pageInfo": PageInfo
}
}
}
prescription
Description
This query fetches a prescription with the specified identifier.
Response
Returns a
Prescription
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
query prescription($id: ID!) {
prescription(id: $id) {
patient {
...PatientFragment
}
doctor {
...UserFragment
}
date
status
drugs {
...PrescriptionDrugFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"prescription": {
"patient": Patient,
"doctor": User,
"date": "2007-12-03",
"status": "abc123",
"drugs": [PrescriptionDrug]
}
}
}
prescriptions
Description
This query fetches a collection of perscriptions that were issued within the specified DateRange. The query can be further refined through the use of QueryOptions to only fetch prescriptions that were created or modified (or both) within specified dates.
Response
Returns a
PrescriptionData
Arguments
Name | Description |
---|---|
dateRange -
DateRange
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query prescriptions(
$dateRange: DateRange,
$pagination: Pagination,
$options: QueryOptions
) {
prescriptions(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...PrescriptionFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"prescriptions": {
"data": [Prescription],
"pageInfo": PageInfo
}
}
}
product
Description
This query fetches the product with the specfifed identifier.
Example
Query
query product($id: ID!) {
product(id: $id) {
id
status
productType
labels {
...ProductLabelFragment
}
itemCode
name
serialNumber
tax {
...TaxFragment
}
stockLevel
price
cost
supplierName
comments
appointments {
...ProductFragment
}
isBookable
duration
color
isVideoConsultation
requiresPayment
requiresConfirmation
createdAt
updatedAt
}
}
Variables
{"id": "4"}
Response
{
"data": {
"product": {
"id": "4",
"status": "abc123",
"productType": "appointment",
"labels": [ProductLabel],
"itemCode": "abc123",
"name": "xyz789",
"serialNumber": "xyz789",
"tax": Tax,
"stockLevel": 987,
"price": 987.65,
"cost": 987.65,
"supplierName": "abc123",
"comments": "xyz789",
"appointments": [Product],
"isBookable": false,
"duration": 987,
"color": "xyz789",
"isVideoConsultation": true,
"requiresPayment": true,
"requiresConfirmation": true,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
products
Description
This query returns a collection of products where the product code or product name matches the supplied search text.
Response
Returns a
ProductData
Arguments
Name | Description |
---|---|
search -
String
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query products(
$search: String,
$pagination: Pagination,
$options: QueryOptions
) {
products(
search: $search,
pagination: $pagination,
options: $options
) {
data {
...ProductFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"search": "xyz789",
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"products": {
"data": [Product],
"pageInfo": PageInfo
}
}
}
record
Description
This query fetches the record with the requested identifier.
Example
Query
query record($id: ID!) {
record(id: $id) {
id
consultationId
sectionId
sectionTitle
recordType
patient
doctorName
term
title
date
start
snomed {
...SnomedFragment
}
observation
dosage
quantity
batchNumber
expiryDate
repeat
sampleDate
injectionDate
fasting
comments
createdAt
updatedAt
}
}
Variables
{"id": 4}
Response
{
"data": {
"record": {
"id": "4",
"consultationId": "abc123",
"sectionId": "xyz789",
"sectionTitle": "xyz789",
"recordType": "xyz789",
"patient": 4,
"doctorName": "abc123",
"term": "xyz789",
"title": "xyz789",
"date": "2007-12-03",
"start": "2007-12-03",
"snomed": Snomed,
"observation": "xyz789",
"dosage": "abc123",
"quantity": "xyz789",
"batchNumber": "abc123",
"expiryDate": "xyz789",
"repeat": 123,
"sampleDate": "2007-12-03",
"injectionDate": "2007-12-03",
"fasting": true,
"comments": "xyz789",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
}
}
records
Description
This query fetches a collection of records held in the system.
Response
Returns a
RecordData
Arguments
Name | Description |
---|---|
dateRange -
DateRange
|
|
pagination -
Pagination
|
|
options -
QueryOptions
|
Example
Query
query records(
$dateRange: DateRange,
$pagination: Pagination,
$options: QueryOptions
) {
records(
dateRange: $dateRange,
pagination: $pagination,
options: $options
) {
data {
...RecordFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"dateRange": DateRange,
"pagination": Pagination,
"options": QueryOptions
}
Response
{
"data": {
"records": {
"data": [Record],
"pageInfo": PageInfo
}
}
}
user
Description
This query fetches the user with the specified identifier if that user belongs to the same practice as the API user making the request.
Example
Query
query user($id: ID!) {
user(id: $id) {
id
firstName
lastName
email
fullName
isDoctor
qualifications
registration
accessGroups {
...UserAccessGroupFragment
}
bookings {
...BookingDataFragment
}
letters {
...LetterDataFragment
}
}
}
Variables
{"id": "4"}
Response
{
"data": {
"user": {
"id": "4",
"firstName": "abc123",
"lastName": "abc123",
"email": "xyz789",
"fullName": "xyz789",
"isDoctor": false,
"qualifications": "xyz789",
"registration": "abc123",
"accessGroups": [UserAccessGroup],
"bookings": BookingData,
"letters": LetterData
}
}
}
users
Description
This query fetches a collection of users that belong to the same practice as the API user making the request. The results are paginated depending on the requested paging parameters.
Response
Returns a
UserData
Arguments
Name | Description |
---|---|
pagination -
Pagination
|
Example
Query
query users($pagination: Pagination) {
users(pagination: $pagination) {
data {
...UserFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{"pagination": Pagination}
Response
{
"data": {
"users": {
"data": [User],
"pageInfo": PageInfo
}
}
}
Mutations
addContactPhoneNumber
Description
This mutation adds a phone number to a contact.
Response
Returns a
ContactResponsePayload
Arguments
Name | Description |
---|---|
contactId -
ID!
|
|
phoneData -
AddContactPhoneData!
|
Example
Query
mutation addContactPhoneNumber(
$contactId: ID!,
$phoneData: AddContactPhoneData!
) {
addContactPhoneNumber(
contactId: $contactId,
phoneData: $phoneData
) {
data {
...ContactFragment
}
error
}
}
Variables
{
"contactId": "4",
"phoneData": AddContactPhoneData
}
Response
{
"data": {
"addContactPhoneNumber": {
"data": Contact,
"error": "abc123"
}
}
}
addInvoicePayment
Description
This mutation is for recording payment made against an invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
|
paymentData -
NewInvoicePaymentDataInput
|
Example
Query
mutation addInvoicePayment(
$invoiceId: ID!,
$paymentData: NewInvoicePaymentDataInput
) {
addInvoicePayment(
invoiceId: $invoiceId,
paymentData: $paymentData
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": 4,
"paymentData": NewInvoicePaymentDataInput
}
Response
{
"data": {
"addInvoicePayment": {
"data": Invoice,
"error": "abc123"
}
}
}
addLineItem
Description
This mutation is for adding a line item to an exising invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
|
lineItemData -
NewLineItemDataInput
|
Example
Query
mutation addLineItem(
$invoiceId: ID!,
$lineItemData: NewLineItemDataInput
) {
addLineItem(
invoiceId: $invoiceId,
lineItemData: $lineItemData
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": "4",
"lineItemData": NewLineItemDataInput
}
Response
{
"data": {
"addLineItem": {
"data": Invoice,
"error": "xyz789"
}
}
}
addPatientAccessGroup
Description
This mutation adds a patient to an access group.
Response
Returns a
PatientResponsePayload
Example
Query
mutation addPatientAccessGroup(
$patientId: ID!,
$accessGroupId: ID!
) {
addPatientAccessGroup(
patientId: $patientId,
accessGroupId: $accessGroupId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "accessGroupId": 4}
Response
{
"data": {
"addPatientAccessGroup": {
"data": Patient,
"error": "xyz789"
}
}
}
addPatientAttribute
Description
This mutation is for adding a patient attribute.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
attributeData -
AddCustomAttributeData!
|
Example
Query
mutation addPatientAttribute(
$patientId: ID!,
$attributeData: AddCustomAttributeData!
) {
addPatientAttribute(
patientId: $patientId,
attributeData: $attributeData
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": "4",
"attributeData": AddCustomAttributeData
}
Response
{
"data": {
"addPatientAttribute": {
"data": Patient,
"error": "abc123"
}
}
}
addPatientLabel
Description
This mutation is for adding a patient label.
Response
Returns a
PatientResponsePayload
Example
Query
mutation addPatientLabel(
$patientId: ID!,
$labelReferenceId: ID!
) {
addPatientLabel(
patientId: $patientId,
labelReferenceId: $labelReferenceId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "labelReferenceId": 4}
Response
{
"data": {
"addPatientLabel": {
"data": Patient,
"error": "abc123"
}
}
}
addPatientNumber
Description
This mutation is for adding a patient number (such as NHS number).
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
patientNumber -
AddPatientNumberData!
|
Example
Query
mutation addPatientNumber(
$patientId: ID!,
$patientNumber: AddPatientNumberData!
) {
addPatientNumber(
patientId: $patientId,
patientNumber: $patientNumber
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": "4",
"patientNumber": AddPatientNumberData
}
Response
{
"data": {
"addPatientNumber": {
"data": Patient,
"error": "xyz789"
}
}
}
addPatientPhoneNumber
Description
This mutation is for adding a patient phone number.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
phoneData -
AddPhoneData!
|
Example
Query
mutation addPatientPhoneNumber(
$patientId: ID!,
$phoneData: AddPhoneData!
) {
addPatientPhoneNumber(
patientId: $patientId,
phoneData: $phoneData
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": "4",
"phoneData": AddPhoneData
}
Response
{
"data": {
"addPatientPhoneNumber": {
"data": Patient,
"error": "abc123"
}
}
}
addPatientRelationship
Description
Adds a
PatientRelationship
to a
Patient
.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
relationshipType -
PatientRelationshipType!
|
Note there are a limited number of options for this field, see
PatientRelationshipType
|
relationshipLabel -
String
|
Label displayed for the new
PatientRelationship if the relationshipType is set to OTHER ; for different values, label is automatically generated and this field is ignored |
contact -
PatientRelationshipContactInput!
|
Details of the
Patient /
Contact this
PatientRelationship links to |
Example
Query
mutation addPatientRelationship(
$patientId: ID!,
$relationshipType: PatientRelationshipType!,
$relationshipLabel: String,
$contact: PatientRelationshipContactInput!
) {
addPatientRelationship(
patientId: $patientId,
relationshipType: $relationshipType,
relationshipLabel: $relationshipLabel,
contact: $contact
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": 4,
"relationshipType": "FAMILY",
"relationshipLabel": "xyz789",
"contact": PatientRelationshipContactInput
}
Response
{
"data": {
"addPatientRelationship": {
"data": Patient,
"error": "xyz789"
}
}
}
addProductLabel
Description
This mutation is for adding a digital label to a specific product.
Response
Returns a
ProductResponsePayload
Example
Query
mutation addProductLabel(
$productId: ID!,
$labelReferenceId: ID!
) {
addProductLabel(
productId: $productId,
labelReferenceId: $labelReferenceId
) {
data {
...ProductFragment
}
error
}
}
Variables
{"productId": 4, "labelReferenceId": "4"}
Response
{
"data": {
"addProductLabel": {
"data": Product,
"error": "abc123"
}
}
}
createBooking
Description
This mutation creates a new booking.
Response
Returns a
BookingResponsePayload
Arguments
Name | Description |
---|---|
patient -
ID
|
Deprecated. Use bookingData instead. |
location -
ID
|
Deprecated. Use bookingData instead. |
bookingType -
ID
|
Deprecated. Use bookingData instead. |
doctor -
ID
|
Deprecated. Use bookingData instead. |
comments -
String
|
Deprecated. Use bookingData instead. |
start -
Date
|
Deprecated. Use bookingData instead. |
end -
Date
|
Deprecated. Use bookingData instead. |
bookingData -
BookingDataInput
|
If you use bookingData, you may not use other fields. |
Example
Query
mutation createBooking(
$patient: ID,
$location: ID,
$bookingType: ID,
$doctor: ID,
$comments: String,
$start: Date,
$end: Date,
$bookingData: BookingDataInput
) {
createBooking(
patient: $patient,
location: $location,
bookingType: $bookingType,
doctor: $doctor,
comments: $comments,
start: $start,
end: $end,
bookingData: $bookingData
) {
data {
...BookingFragment
}
error
}
}
Variables
{
"patient": "4",
"location": 4,
"bookingType": 4,
"doctor": "4",
"comments": "abc123",
"start": "2007-12-03",
"end": "2007-12-03",
"bookingData": BookingDataInput
}
Response
{
"data": {
"createBooking": {
"data": Booking,
"error": "abc123"
}
}
}
createContact
Description
This mutation is for creating a new external contact in Semble.
Response
Returns a
NewContactPayload
Example
Query
mutation createContact(
$title: String,
$first: String,
$last: String,
$company: String,
$email: String,
$address: String,
$city: String,
$postcode: String,
$country: String,
$phoneType: String,
$phoneNumber: String
) {
createContact(
title: $title,
first: $first,
last: $last,
company: $company,
email: $email,
address: $address,
city: $city,
postcode: $postcode,
country: $country,
phoneType: $phoneType,
phoneNumber: $phoneNumber
) {
data {
...ContactFragment
}
error
}
}
Variables
{
"title": "abc123",
"first": "abc123",
"last": "abc123",
"company": "xyz789",
"email": "xyz789",
"address": "xyz789",
"city": "xyz789",
"postcode": "abc123",
"country": "xyz789",
"phoneType": "xyz789",
"phoneNumber": "xyz789"
}
Response
{
"data": {
"createContact": {
"data": Contact,
"error": "xyz789"
}
}
}
createInvoice
Description
This mutation is for creating a new invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceData -
NewInvoiceDataInput
|
Example
Query
mutation createInvoice($invoiceData: NewInvoiceDataInput) {
createInvoice(invoiceData: $invoiceData) {
data {
...InvoiceFragment
}
error
}
}
Variables
{"invoiceData": NewInvoiceDataInput}
Response
{
"data": {
"createInvoice": {
"data": Invoice,
"error": "xyz789"
}
}
}
createLabel
Description
This mutation is for creating a new label.
Response
Returns a
NewLabelPayload
Arguments
Name | Description |
---|---|
labelData -
CreateLabelData
|
Example
Query
mutation createLabel($labelData: CreateLabelData) {
createLabel(labelData: $labelData) {
data {
...LabelFragment
}
error
}
}
Variables
{"labelData": CreateLabelData}
Response
{
"data": {
"createLabel": {
"data": Label,
"error": "abc123"
}
}
}
createLetter
Description
This mutation is for creating a new letter.
Response
Returns a
LetterResponsePayload
Arguments
Name | Description |
---|---|
letterData -
CreateLetterDataInput!
|
Example
Query
mutation createLetter($letterData: CreateLetterDataInput!) {
createLetter(letterData: $letterData) {
data {
...LetterFragment
}
error
}
}
Variables
{"letterData": CreateLetterDataInput}
Response
{
"data": {
"createLetter": {
"data": Letter,
"error": "abc123"
}
}
}
createPatient
Description
This mutation is for creating a new patient.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
title -
String
|
Deprecated. Use patientData instead. |
first -
String
|
Deprecated. Use patientData instead. |
last -
String
|
Deprecated. Use patientData instead. |
email -
String
|
Deprecated. Use patientData instead. |
dob -
Date
|
Deprecated. Use patientData instead. |
gender -
String
|
Deprecated. Use patientData instead. |
sex -
String
|
Deprecated. Use patientData instead. |
address -
String
|
Deprecated. Use patientData instead. |
city -
String
|
Deprecated. Use patientData instead. |
postcode -
String
|
Deprecated. Use patientData instead. |
country -
String
|
Deprecated. Use patientData instead. |
phoneType -
String
|
Deprecated. Use patientData instead. |
phoneNumber -
String
|
Deprecated. Use patientData instead. |
patientData -
CreatePatientDataInput
|
If you use patientData, you may not use other params. |
Example
Query
mutation createPatient(
$title: String,
$first: String,
$last: String,
$email: String,
$dob: Date,
$gender: String,
$sex: String,
$address: String,
$city: String,
$postcode: String,
$country: String,
$phoneType: String,
$phoneNumber: String,
$patientData: CreatePatientDataInput
) {
createPatient(
title: $title,
first: $first,
last: $last,
email: $email,
dob: $dob,
gender: $gender,
sex: $sex,
address: $address,
city: $city,
postcode: $postcode,
country: $country,
phoneType: $phoneType,
phoneNumber: $phoneNumber,
patientData: $patientData
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"title": "xyz789",
"first": "abc123",
"last": "abc123",
"email": "abc123",
"dob": "2007-12-03",
"gender": "abc123",
"sex": "abc123",
"address": "xyz789",
"city": "abc123",
"postcode": "xyz789",
"country": "abc123",
"phoneType": "xyz789",
"phoneNumber": "abc123",
"patientData": CreatePatientDataInput
}
Response
{
"data": {
"createPatient": {
"data": Patient,
"error": "abc123"
}
}
}
createPatientDocument
Description
This mutation is for creating a new patient document.
Response
Returns a
NewPatientDocumentPayload
Example
Query
mutation createPatientDocument(
$patient: ID!,
$name: String!,
$type: String!
) {
createPatientDocument(
patient: $patient,
name: $name,
type: $type
) {
data {
...PatientDocumentFragment
}
error
}
}
Variables
{
"patient": "4",
"name": "abc123",
"type": "xyz789"
}
Response
{
"data": {
"createPatientDocument": {
"data": PatientDocument,
"error": "abc123"
}
}
}
createPracticeTemplateDocument
Description
This mutation creates a practice template document.
Response
Returns a
NewPracticeTemplateDocumentPayload
Example
Query
mutation createPracticeTemplateDocument(
$name: String!,
$type: String!
) {
createPracticeTemplateDocument(
name: $name,
type: $type
) {
data {
...PracticeTemplateDocumentFragment
}
error
}
}
Variables
{
"name": "xyz789",
"type": "xyz789"
}
Response
{
"data": {
"createPracticeTemplateDocument": {
"data": PracticeTemplateDocument,
"error": "xyz789"
}
}
}
createProduct
Description
This mutation creates a new product.
Response
Returns a
ProductResponsePayload
Arguments
Name | Description |
---|---|
productData -
ProductDataInput!
|
Example
Query
mutation createProduct($productData: ProductDataInput!) {
createProduct(productData: $productData) {
data {
...ProductFragment
}
error
}
}
Variables
{"productData": ProductDataInput}
Response
{
"data": {
"createProduct": {
"data": Product,
"error": "abc123"
}
}
}
deleteBooking
Description
This mutation deletes an existing booking.
Response
Returns a
BookingResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
mutation deleteBooking($id: ID!) {
deleteBooking(id: $id) {
data {
...BookingFragment
}
error
}
}
Variables
{"id": "4"}
Response
{
"data": {
"deleteBooking": {
"data": Booking,
"error": "abc123"
}
}
}
deleteContact
Description
This mutation deletes a contact.
Response
Returns a
ContactResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
mutation deleteContact($id: ID!) {
deleteContact(id: $id) {
data {
...ContactFragment
}
error
}
}
Variables
{"id": "4"}
Response
{
"data": {
"deleteContact": {
"data": Contact,
"error": "xyz789"
}
}
}
deleteInvoice
Description
This mutation is for deleting an exising invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
Example
Query
mutation deleteInvoice($invoiceId: ID!) {
deleteInvoice(invoiceId: $invoiceId) {
data {
...InvoiceFragment
}
error
}
}
Variables
{"invoiceId": 4}
Response
{
"data": {
"deleteInvoice": {
"data": Invoice,
"error": "xyz789"
}
}
}
deleteInvoicePayment
Description
This mutation is for deleting the record of a payment made against an invoice.
Response
Returns a
NewInvoiceResponsePayload
Example
Query
mutation deleteInvoicePayment(
$invoiceId: ID!,
$invoicePaymentId: ID!
) {
deleteInvoicePayment(
invoiceId: $invoiceId,
invoicePaymentId: $invoicePaymentId
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": "4",
"invoicePaymentId": "4"
}
Response
{
"data": {
"deleteInvoicePayment": {
"data": Invoice,
"error": "abc123"
}
}
}
deleteLetter
Description
This mutation is for deleting an existing letter.
Response
Returns a
LetterResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
mutation deleteLetter($id: ID!) {
deleteLetter(id: $id) {
data {
...LetterFragment
}
error
}
}
Variables
{"id": "4"}
Response
{
"data": {
"deleteLetter": {
"data": Letter,
"error": "abc123"
}
}
}
deleteLineItem
Description
This mutation is for deleting a line item from an exising invoice.
Response
Returns a
NewInvoiceResponsePayload
Example
Query
mutation deleteLineItem(
$invoiceId: ID!,
$lineItemId: ID!
) {
deleteLineItem(
invoiceId: $invoiceId,
lineItemId: $lineItemId
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": "4",
"lineItemId": "4"
}
Response
{
"data": {
"deleteLineItem": {
"data": Invoice,
"error": "abc123"
}
}
}
deletePatient
Description
This mutation deletes a patient.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
mutation deletePatient($id: ID!) {
deletePatient(id: $id) {
data {
...PatientFragment
}
error
}
}
Variables
{"id": 4}
Response
{
"data": {
"deletePatient": {
"data": Patient,
"error": "xyz789"
}
}
}
deleteProduct
Description
This mutation deletes a product.
Response
Returns a
ProductResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
Example
Query
mutation deleteProduct($id: ID!) {
deleteProduct(id: $id) {
data {
...ProductFragment
}
error
}
}
Variables
{"id": 4}
Response
{
"data": {
"deleteProduct": {
"data": Product,
"error": "xyz789"
}
}
}
removeContactPhoneNumber
Description
This mutation removes a phone number from a contact.
Response
Returns a
ContactResponsePayload
Example
Query
mutation removeContactPhoneNumber(
$contactId: ID!,
$phoneId: ID!
) {
removeContactPhoneNumber(
contactId: $contactId,
phoneId: $phoneId
) {
data {
...ContactFragment
}
error
}
}
Variables
{"contactId": 4, "phoneId": 4}
Response
{
"data": {
"removeContactPhoneNumber": {
"data": Contact,
"error": "xyz789"
}
}
}
removePatientAccessGroup
Description
This mutation removes a patient from an access group.
Response
Returns a
PatientResponsePayload
Example
Query
mutation removePatientAccessGroup(
$patientId: ID!,
$accessGroupId: ID!
) {
removePatientAccessGroup(
patientId: $patientId,
accessGroupId: $accessGroupId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "accessGroupId": "4"}
Response
{
"data": {
"removePatientAccessGroup": {
"data": Patient,
"error": "xyz789"
}
}
}
removePatientAttribute
Description
This mutation is for removing a patient attribute.
Response
Returns a
PatientResponsePayload
Example
Query
mutation removePatientAttribute(
$patientId: ID!,
$attributeId: ID!
) {
removePatientAttribute(
patientId: $patientId,
attributeId: $attributeId
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": "4",
"attributeId": "4"
}
Response
{
"data": {
"removePatientAttribute": {
"data": Patient,
"error": "xyz789"
}
}
}
removePatientLabel
Description
This mutation is for removing a patient label.
Response
Returns a
PatientResponsePayload
Example
Query
mutation removePatientLabel(
$patientId: ID!,
$labelId: ID!
) {
removePatientLabel(
patientId: $patientId,
labelId: $labelId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "labelId": 4}
Response
{
"data": {
"removePatientLabel": {
"data": Patient,
"error": "xyz789"
}
}
}
removePatientNumber
Description
This mutation is for removing a patient number (such as NHS number).
Response
Returns a
PatientResponsePayload
Example
Query
mutation removePatientNumber(
$patientId: ID!,
$patientNumberId: ID!
) {
removePatientNumber(
patientId: $patientId,
patientNumberId: $patientNumberId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "patientNumberId": 4}
Response
{
"data": {
"removePatientNumber": {
"data": Patient,
"error": "abc123"
}
}
}
removePatientPhoneNumber
Description
This mutation is for removing a patient phone number.
Response
Returns a
PatientResponsePayload
Example
Query
mutation removePatientPhoneNumber(
$patientId: ID!,
$phoneId: ID!
) {
removePatientPhoneNumber(
patientId: $patientId,
phoneId: $phoneId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "phoneId": "4"}
Response
{
"data": {
"removePatientPhoneNumber": {
"data": Patient,
"error": "xyz789"
}
}
}
removePatientRelationship
Description
Removes an existing
PatientRelationship
from a
Patient
.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
relationshipId -
ID!
|
The ID of the specific
PatientRelationship associated with the
Patient that should be removed |
Example
Query
mutation removePatientRelationship(
$patientId: ID!,
$relationshipId: ID!
) {
removePatientRelationship(
patientId: $patientId,
relationshipId: $relationshipId
) {
data {
...PatientFragment
}
error
}
}
Variables
{"patientId": 4, "relationshipId": "4"}
Response
{
"data": {
"removePatientRelationship": {
"data": Patient,
"error": "abc123"
}
}
}
removeProductLabel
Description
This mutation removes a digital label from a specific product.
Response
Returns a
ProductResponsePayload
Example
Query
mutation removeProductLabel(
$productId: ID!,
$labelId: ID!
) {
removeProductLabel(
productId: $productId,
labelId: $labelId
) {
data {
...ProductFragment
}
error
}
}
Variables
{"productId": "4", "labelId": 4}
Response
{
"data": {
"removeProductLabel": {
"data": Product,
"error": "xyz789"
}
}
}
signIn
Description
This mutation generates an authentication token used for signing into the API.
Response
Returns a
Token!
Example
Query
mutation signIn(
$apiKey: String,
$email: String,
$password: String!
) {
signIn(
apiKey: $apiKey,
email: $email,
password: $password
) {
token
user {
...UserFragment
}
}
}
Variables
{
"apiKey": "xyz789",
"email": "abc123",
"password": "abc123"
}
Response
{
"data": {
"signIn": {
"token": "xyz789",
"user": User
}
}
}
updateBooking
Description
This mutation updates an existing booking.
Response
Returns a
BookingResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
bookingData -
BookingDataInput
|
Example
Query
mutation updateBooking(
$id: ID!,
$bookingData: BookingDataInput
) {
updateBooking(
id: $id,
bookingData: $bookingData
) {
data {
...BookingFragment
}
error
}
}
Variables
{
"id": "4",
"bookingData": BookingDataInput
}
Response
{
"data": {
"updateBooking": {
"data": Booking,
"error": "xyz789"
}
}
}
updateBookingJourney
Description
This mutation updates the journey of a patient for a booking.
Response
Returns a
BookingResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
bookingJourneyInput -
BookingJourneyInput
|
Example
Query
mutation updateBookingJourney(
$id: ID!,
$bookingJourneyInput: BookingJourneyInput
) {
updateBookingJourney(
id: $id,
bookingJourneyInput: $bookingJourneyInput
) {
data {
...BookingFragment
}
error
}
}
Variables
{"id": 4, "bookingJourneyInput": BookingJourneyInput}
Response
{
"data": {
"updateBookingJourney": {
"data": Booking,
"error": "xyz789"
}
}
}
updateContact
Description
This mutation updates the details of a contact.
Response
Returns a
ContactResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
contactData -
UpdateContactDataInput!
|
Example
Query
mutation updateContact(
$id: ID!,
$contactData: UpdateContactDataInput!
) {
updateContact(
id: $id,
contactData: $contactData
) {
data {
...ContactFragment
}
error
}
}
Variables
{
"id": "4",
"contactData": UpdateContactDataInput
}
Response
{
"data": {
"updateContact": {
"data": Contact,
"error": "abc123"
}
}
}
updateContactPhoneNumber
Description
This mutation updates a contact's phone number.
Response
Returns a
ContactResponsePayload
Arguments
Name | Description |
---|---|
contactId -
ID!
|
|
phoneId -
ID!
|
|
phoneData -
UpdateContactPhoneData
|
Example
Query
mutation updateContactPhoneNumber(
$contactId: ID!,
$phoneId: ID!,
$phoneData: UpdateContactPhoneData
) {
updateContactPhoneNumber(
contactId: $contactId,
phoneId: $phoneId,
phoneData: $phoneData
) {
data {
...ContactFragment
}
error
}
}
Variables
{
"contactId": "4",
"phoneId": "4",
"phoneData": UpdateContactPhoneData
}
Response
{
"data": {
"updateContactPhoneNumber": {
"data": Contact,
"error": "abc123"
}
}
}
updateInvoice
Description
This mutation is for updating an exising invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
|
invoiceData -
UpdateInvoiceDataInput
|
Example
Query
mutation updateInvoice(
$invoiceId: ID!,
$invoiceData: UpdateInvoiceDataInput
) {
updateInvoice(
invoiceId: $invoiceId,
invoiceData: $invoiceData
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": "4",
"invoiceData": UpdateInvoiceDataInput
}
Response
{
"data": {
"updateInvoice": {
"data": Invoice,
"error": "abc123"
}
}
}
updateInvoicePayment
Description
This mutation is for updating the record of a payment made against an invoice.
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
|
invoicePaymentId -
ID!
|
|
paymentData -
UpdateInvoicePaymentDataInput
|
Example
Query
mutation updateInvoicePayment(
$invoiceId: ID!,
$invoicePaymentId: ID!,
$paymentData: UpdateInvoicePaymentDataInput
) {
updateInvoicePayment(
invoiceId: $invoiceId,
invoicePaymentId: $invoicePaymentId,
paymentData: $paymentData
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": 4,
"invoicePaymentId": 4,
"paymentData": UpdateInvoicePaymentDataInput
}
Response
{
"data": {
"updateInvoicePayment": {
"data": Invoice,
"error": "abc123"
}
}
}
updateLetter
Description
This mutation is for updating an existing letter.
Response
Returns a
LetterResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
letterData -
UpdateLetterDataInput!
|
Example
Query
mutation updateLetter(
$id: ID!,
$letterData: UpdateLetterDataInput!
) {
updateLetter(
id: $id,
letterData: $letterData
) {
data {
...LetterFragment
}
error
}
}
Variables
{
"id": "4",
"letterData": UpdateLetterDataInput
}
Response
{
"data": {
"updateLetter": {
"data": Letter,
"error": "xyz789"
}
}
}
updateLineItem
Response
Returns a
NewInvoiceResponsePayload
Arguments
Name | Description |
---|---|
invoiceId -
ID!
|
|
lineItemId -
ID!
|
|
lineItemData -
UpdateLineItemDataInput
|
Example
Query
mutation updateLineItem(
$invoiceId: ID!,
$lineItemId: ID!,
$lineItemData: UpdateLineItemDataInput
) {
updateLineItem(
invoiceId: $invoiceId,
lineItemId: $lineItemId,
lineItemData: $lineItemData
) {
data {
...InvoiceFragment
}
error
}
}
Variables
{
"invoiceId": 4,
"lineItemId": 4,
"lineItemData": UpdateLineItemDataInput
}
Response
{
"data": {
"updateLineItem": {
"data": Invoice,
"error": "xyz789"
}
}
}
updatePatient
Description
This mutation updates the details of an existing patient.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
patientData -
UpdatePatientDataInput!
|
Example
Query
mutation updatePatient(
$id: ID!,
$patientData: UpdatePatientDataInput!
) {
updatePatient(
id: $id,
patientData: $patientData
) {
data {
...PatientFragment
}
error
}
}
Variables
{"id": 4, "patientData": UpdatePatientDataInput}
Response
{
"data": {
"updatePatient": {
"data": Patient,
"error": "abc123"
}
}
}
updatePatientAttribute
Description
This mutation is for updating a patient attribute.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
attributeId -
ID!
|
|
attributeData -
UpdateCustomAttributeData!
|
Example
Query
mutation updatePatientAttribute(
$patientId: ID!,
$attributeId: ID!,
$attributeData: UpdateCustomAttributeData!
) {
updatePatientAttribute(
patientId: $patientId,
attributeId: $attributeId,
attributeData: $attributeData
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": 4,
"attributeId": "4",
"attributeData": UpdateCustomAttributeData
}
Response
{
"data": {
"updatePatientAttribute": {
"data": Patient,
"error": "xyz789"
}
}
}
updatePatientNumber
Description
This mutation is for updating a patient number (such as NHS number).
Response
Returns a
PatientResponsePayload
Example
Query
mutation updatePatientNumber(
$patientId: ID!,
$patientNumberId: ID!,
$value: String
) {
updatePatientNumber(
patientId: $patientId,
patientNumberId: $patientNumberId,
value: $value
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": 4,
"patientNumberId": 4,
"value": "abc123"
}
Response
{
"data": {
"updatePatientNumber": {
"data": Patient,
"error": "xyz789"
}
}
}
updatePatientPhoneNumber
Description
This mutation is for updating a patient phone number.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
phoneId -
ID!
|
|
phoneData -
UpdatePhoneData
|
Example
Query
mutation updatePatientPhoneNumber(
$patientId: ID!,
$phoneId: ID!,
$phoneData: UpdatePhoneData
) {
updatePatientPhoneNumber(
patientId: $patientId,
phoneId: $phoneId,
phoneData: $phoneData
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": 4,
"phoneId": 4,
"phoneData": UpdatePhoneData
}
Response
{
"data": {
"updatePatientPhoneNumber": {
"data": Patient,
"error": "abc123"
}
}
}
updatePatientRelationship
Description
Updates an existing
PatientRelationship
held by a
Patient
. Note that the relationshipType
and relationshipLabel
fields cannot be updated using this mutation.
Response
Returns a
PatientResponsePayload
Arguments
Name | Description |
---|---|
patientId -
ID!
|
|
relationshipId -
ID!
|
The ID of the specific
PatientRelationship associated with the
Patient that should be updated |
contact -
PatientRelationshipContactInput!
|
Details of the
Patient /
Contact this
PatientRelationship links to |
Example
Query
mutation updatePatientRelationship(
$patientId: ID!,
$relationshipId: ID!,
$contact: PatientRelationshipContactInput!
) {
updatePatientRelationship(
patientId: $patientId,
relationshipId: $relationshipId,
contact: $contact
) {
data {
...PatientFragment
}
error
}
}
Variables
{
"patientId": "4",
"relationshipId": "4",
"contact": PatientRelationshipContactInput
}
Response
{
"data": {
"updatePatientRelationship": {
"data": Patient,
"error": "xyz789"
}
}
}
updateProduct
Description
This mutation updates the details of a product.
Response
Returns a
ProductResponsePayload
Arguments
Name | Description |
---|---|
id -
ID!
|
|
productData -
ProductDataInput!
|
Example
Query
mutation updateProduct(
$id: ID!,
$productData: ProductDataInput!
) {
updateProduct(
id: $id,
productData: $productData
) {
data {
...ProductFragment
}
error
}
}
Variables
{
"id": "4",
"productData": ProductDataInput
}
Response
{
"data": {
"updateProduct": {
"data": Product,
"error": "xyz789"
}
}
}
Types
Account
AccountStatement
Description
This type allows you to display the output of a query for a patient's account statement.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
statementType -
AccountStatementType
|
|
date -
Date
|
|
start -
Date
|
|
end -
Date
|
|
header -
String
|
|
accountReferenceNumber -
String
|
|
comments -
String
|
|
account -
Account
|
|
invoices -
[Invoice]
|
|
totalPaid -
Float
|
|
totalPrice -
Float
|
|
totalOutstanding -
Float
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
|
deleted -
Boolean
|
Example
{
"id": 4,
"statementType": "ACTIVITY",
"date": "2007-12-03",
"start": "2007-12-03",
"end": "2007-12-03",
"header": "abc123",
"accountReferenceNumber": "abc123",
"comments": "xyz789",
"account": Patient,
"invoices": [Invoice],
"totalPaid": 123.45,
"totalPrice": 987.65,
"totalOutstanding": 987.65,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03",
"deleted": false
}
AccountStatementData
Description
This type encompasses a collection of AccountStatement and Pagination information.
Fields
Field Name | Description |
---|---|
data -
[AccountStatement]
|
|
pageInfo -
PageInfoForCursorPagination
|
Example
{
"data": [AccountStatement],
"pageInfo": PageInfoForCursorPagination
}
AccountStatementType
Description
Allowed statement types.
Values
Enum Value | Description |
---|---|
|
|
|
Example
"ACTIVITY"
AddContactPhoneData
Description
Used to add a telephone number to a contact.
Fields
Input Field | Description |
---|---|
phoneNumber -
String!
|
|
phoneType -
PhoneType!
|
Example
{
"phoneNumber": "xyz789",
"phoneType": "Mobile"
}
AddCustomAttributeData
AddPatientNumberData
AddPhoneData
Address
Appointment
AppointmentType
Availability
AvailabilityData
Description
A collection of
Availabilities
Fields
Field Name | Description |
---|---|
data -
[Availability]
|
Example
{"data": [Availability]}
Booking
Description
A booking.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
deleted -
Boolean
|
|
cancellationReason -
String
|
|
doctorName -
String
|
|
doctor -
User
|
|
location -
BookingLocation
|
|
appointment -
Appointment
|
|
start -
Date
|
|
end -
Date
|
|
patient -
Patient
|
|
patientId -
ID
|
|
bookingJourney -
Journey
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
|
videoUrl -
String
|
|
comments -
String
|
|
reference -
String
|
Example
{
"id": 4,
"deleted": false,
"cancellationReason": "xyz789",
"doctorName": "xyz789",
"doctor": User,
"location": BookingLocation,
"appointment": Appointment,
"start": "2007-12-03",
"end": "2007-12-03",
"patient": Patient,
"patientId": 4,
"bookingJourney": Journey,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03",
"videoUrl": "abc123",
"comments": "xyz789",
"reference": "abc123"
}
BookingAddress
BookingData
BookingDataInput
Description
Data representing a new booking.
Example
{
"patient": "4",
"location": 4,
"bookingType": "4",
"doctor": "4",
"comments": "abc123",
"start": "2007-12-03",
"end": "2007-12-03"
}
BookingJourneyInput
Fields
Input Field | Description |
---|---|
journeyStage -
JourneyStage
|
|
date -
Date
|
Example
{
"journeyStage": "arrived",
"date": "2007-12-03"
}
BookingLocation
Description
The place the booking takes place.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
header -
String
|
|
name -
String
|
|
address -
BookingAddress
|
Example
{
"id": "4",
"header": "abc123",
"name": "abc123",
"address": BookingAddress
}
BookingResponsePayload
Boolean
Description
The Boolean
scalar type represents true
or false
.
Example
true
CommunicationPreferences
Description
A patients communication preferences.
Fields
Field Name | Description |
---|---|
receiveEmail -
Boolean
|
|
receiveSMS -
Boolean
|
|
promotionalMarketing -
Boolean
|
|
privacyPolicy -
PrivacyPolicy
|
Example
{
"receiveEmail": true,
"receiveSMS": false,
"promotionalMarketing": false,
"privacyPolicy": PrivacyPolicy
}
Contact
Description
A contact.
Example
{
"id": "4",
"title": "abc123",
"status": "xyz789",
"firstName": "abc123",
"lastName": "abc123",
"fullName": "xyz789",
"email": "xyz789",
"phones": [Phone],
"address": Address,
"numbers": [PatientNumber],
"medicalSpecialty": "abc123",
"company": "xyz789",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
ContactData
ContactResponsePayload
CreateLabelData
CreateLetterDataInput
Description
Data defining a new letter.
Example
{
"patient": "xyz789",
"contact": "abc123",
"location": "xyz789",
"doctor": "abc123",
"title": "abc123",
"body": "abc123",
"date": "2007-12-03",
"reviewStatus": "NONE"
}
CreatePatientDataInput
Description
The data used to create a new patient.
Fields
Input Field | Description |
---|---|
title -
String
|
|
first -
String
|
|
last -
String
|
|
email -
String
|
|
dob -
Date
|
|
gender -
String
|
|
sex -
String
|
|
address -
String
|
|
city -
String
|
|
postcode -
String
|
|
country -
String
|
|
phoneType -
String
|
|
phoneNumber -
String
|
|
paymentReference -
String
|
|
communicationPreferences -
PatientCommunicationPreferencesInput
|
|
labels -
[ID!]
|
|
customAttributes -
[AddCustomAttributeData]
|
Example
{
"title": "abc123",
"first": "xyz789",
"last": "xyz789",
"email": "abc123",
"dob": "2007-12-03",
"gender": "abc123",
"sex": "abc123",
"address": "abc123",
"city": "xyz789",
"postcode": "xyz789",
"country": "abc123",
"phoneType": "xyz789",
"phoneNumber": "abc123",
"paymentReference": "xyz789",
"communicationPreferences": PatientCommunicationPreferencesInput,
"labels": [4],
"customAttributes": [AddCustomAttributeData]
}
CursorPagination
Description
For pagination that is cursor-based.
Fields
Input Field | Description |
---|---|
cursor -
String
|
The starting element for the next page. A typical usecase would be identifier of the last object received. |
direction -
CursorPaginationDirection
|
Used to provide a direction of travel through the result set. |
pageSize -
Int
|
How many objects to retrieve |
Example
{
"cursor": "abc123",
"direction": "PREVIOUS",
"pageSize": 987
}
CursorPaginationDirection
Description
The subsequent page to fetch.
Values
Enum Value | Description |
---|---|
|
|
|
Example
"PREVIOUS"
CustomAttribute
Date
Example
"2007-12-03"
DateRange
Description
A date range used when considering the relevance of results. No assumptions or adjustments are made to the times in the supplied dates, most cases will require the user to define the times as appropriate.
Example
{
"start": "2007-12-03",
"end": "2007-12-03"
}
Float
Description
The Float
scalar type represents signed double-precision fractional values as specified by
IEEE 754.
Example
987.65
ID
Description
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
4
IdType
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"SYSTEM"
Int
Description
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
Invoice
Fields
Field Name | Description |
---|---|
id -
ID
|
|
status -
String
|
|
paidOrOutstanding -
String
|
|
invoiceNumber -
Int
|
|
paymentReference -
String
|
|
date -
Date
|
|
patientId -
ID
|
|
patient -
Patient
|
|
payeeDetails -
String
|
|
doctorId -
ID
|
|
doctor -
User
|
|
location -
String
|
|
lineItems -
[LineItem]
|
|
payments -
[InvoicePayment]
|
|
tax -
Float
|
|
total -
Float
|
|
outstanding -
Float
|
|
comments -
String
|
Internal Notes. |
extraInfo -
String
|
Notes. |
type -
String
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
Example
{
"id": "4",
"status": "abc123",
"paidOrOutstanding": "abc123",
"invoiceNumber": 123,
"paymentReference": "abc123",
"date": "2007-12-03",
"patientId": 4,
"patient": Patient,
"payeeDetails": "abc123",
"doctorId": "4",
"doctor": User,
"location": "abc123",
"lineItems": [LineItem],
"payments": [InvoicePayment],
"tax": 987.65,
"total": 123.45,
"outstanding": 987.65,
"comments": "abc123",
"extraInfo": "xyz789",
"type": "abc123",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
InvoiceData
InvoicePayment
Journey
JourneyStage
Description
Allowed stages in the booking journey.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"arrived"
Lab
Description
Representation of a pathology request for sending to a lab.
Example
{
"id": 4,
"status": "abc123",
"patient": Patient,
"doctor": User,
"requestDate": "2007-12-03",
"sampleDate": "2007-12-03",
"fasting": true,
"orderNumber": "abc123",
"parsedResults": "xyz789",
"resultsReceivedAt": "2007-12-03",
"testList": "abc123",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
LabData
LabQueryOptions
Description
Used for further refining lab search results.
Example
{
"includeDeleted": true,
"createdAt": DateRange,
"updatedAt": DateRange,
"resultsReceivedAt": DateRange
}
Label
LabelData
Letter
Description
A letter in the system.
Example
{
"id": "4",
"deleted": true,
"reviewStatus": "NONE",
"patient": Patient,
"doctor": User,
"date": "2007-12-03",
"title": "xyz789",
"body": "abc123",
"contact": LetterContact,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
LetterContact
LetterData
LetterResponsePayload
LineItem
Description
An entry in an invoice.
Example
{
"id": "4",
"date": "2007-12-03",
"title": "xyz789",
"productType": "abc123",
"itemCode": "xyz789",
"cost": 987.65,
"price": 987.65,
"quantity": 987.65,
"taxRate": 987.65,
"total": 123.45
}
NewContactPayload
NewInvoiceDataInput
Description
Used for creating a new invoice.
Fields
Input Field | Description |
---|---|
date -
Date!
|
|
patientId -
ID!
|
|
doctorId -
ID!
|
|
locationId -
ID!
|
|
comments -
String
|
|
extraInfo -
String
|
|
lineItems -
[NewLineItemDataInput]
|
|
payments -
[NewInvoicePaymentDataInput]
|
Example
{
"date": "2007-12-03",
"patientId": "4",
"doctorId": "4",
"locationId": 4,
"comments": "abc123",
"extraInfo": "xyz789",
"lineItems": [NewLineItemDataInput],
"payments": [NewInvoicePaymentDataInput]
}
NewInvoicePaymentDataInput
NewInvoiceResponsePayload
NewLabelPayload
NewLineItemDataInput
NewPatientDocumentPayload
Description
The type representing the patient document to create.
Fields
Field Name | Description |
---|---|
data -
PatientDocument
|
|
error -
String
|
Example
{
"data": PatientDocument,
"error": "xyz789"
}
NewPracticeTemplateDocumentPayload
Description
Type type representing the practice document template to create.
Fields
Field Name | Description |
---|---|
data -
PracticeTemplateDocument
|
|
error -
String
|
Example
{
"data": PracticeTemplateDocument,
"error": "xyz789"
}
PageInfo
Description
Information regarding how the requested data is paginated. This type is soon to phased out in preferece for the better performing PageInfoForCursorPagination.
Example
{"page": 123, "pageSize": 123, "hasMore": true}
PageInfoForCursorPagination
Pagination
Patient
Description
The data defining a patient.
Fields
Field Name | Description |
---|---|
id -
ID
|
|
title -
String
|
|
status -
String
|
|
firstName -
String
|
|
lastName -
String
|
|
fullName -
String
|
|
dob -
Date
|
|
gender -
String
|
|
sex -
String
|
|
email -
String
|
|
googleClientId -
String
|
|
paymentReference -
String
|
|
phones -
[Phone]
|
|
occupation -
String
|
|
address -
Address
|
|
membershipName -
String
|
|
membershipStartDate -
String
|
|
sharingToken -
SharingToken
|
|
numbers -
[PatientNumber]
|
|
customAttributes -
[CustomAttribute]
|
|
communicationPreferences -
CommunicationPreferences
|
|
relatedAccounts -
[PatientRelationship]
|
|
bookings -
[Booking]
|
|
invoices -
[Invoice]
|
|
letters -
[Letter]
|
|
labs -
[Lab]
|
|
labels -
[PatientLabel]
|
|
prescriptions -
PrescriptionData
|
|
records -
RecordData
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
|
accessGroups -
[PatientAccessGroup]
|
Example
{
"id": "4",
"title": "abc123",
"status": "abc123",
"firstName": "xyz789",
"lastName": "abc123",
"fullName": "abc123",
"dob": "2007-12-03",
"gender": "abc123",
"sex": "abc123",
"email": "xyz789",
"googleClientId": "xyz789",
"paymentReference": "abc123",
"phones": [Phone],
"occupation": "xyz789",
"address": Address,
"membershipName": "abc123",
"membershipStartDate": "xyz789",
"sharingToken": SharingToken,
"numbers": [PatientNumber],
"customAttributes": [CustomAttribute],
"communicationPreferences": CommunicationPreferences,
"relatedAccounts": [PatientRelationship],
"bookings": [Booking],
"invoices": [Invoice],
"letters": [Letter],
"labs": [Lab],
"labels": [PatientLabel],
"prescriptions": PrescriptionData,
"records": RecordData,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03",
"accessGroups": [PatientAccessGroup]
}
PatientAccessGroup
PatientCommunicationPreferencesInput
Description
The data defining patient communication options.
Example
{
"receiveEmail": false,
"receiveSMS": false,
"promotionalMarketing": false,
"privacyPolicy": "xyz789"
}
PatientData
PatientDocument
Description
A document that is associated to a patient.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
title -
String
|
|
patientId -
ID
|
|
patient -
Patient
|
|
path -
String
|
|
name -
String
|
|
type -
String
|
|
url -
String
|
|
parent -
ID
|
|
deleted -
Boolean
|
|
dateCreated -
Date
|
|
dateModified -
Date
|
|
uploadUrl -
String
|
|
downloadUrl -
String
|
A URL that can be used to download the patient document. This URL expires after two hours and can be used more than once. |
Example
{
"id": 4,
"title": "abc123",
"patientId": "4",
"patient": Patient,
"path": "xyz789",
"name": "xyz789",
"type": "xyz789",
"url": "abc123",
"parent": "4",
"deleted": true,
"dateCreated": "2007-12-03",
"dateModified": "2007-12-03",
"uploadUrl": "abc123",
"downloadUrl": "xyz789"
}
PatientDocumentData
Description
A collection of patient documents and the related pagination information.
Fields
Field Name | Description |
---|---|
data -
[PatientDocument]
|
|
pageInfo -
PageInfo
|
Example
{
"data": [PatientDocument],
"pageInfo": PageInfo
}
PatientLabel
PatientNumber
PatientRelationship
Description
A patient relationship held by a
Patient
.
Fields
Field Name | Description |
---|---|
relationshipId -
ID
|
|
relationshipType -
PatientRelationshipType
|
|
relationshipLabel -
String
|
Label displayed for this relationship if the relationshipType has been set to OTHER ; for different values, label is automatically generated and this field is ignored |
deleted -
Boolean
|
Returns true if there is a related
Patient /
Contact that has been deleted, and false otherwise |
contactDetails -
PatientRelationshipContact
|
Example
{
"relationshipId": 4,
"relationshipType": "FAMILY",
"relationshipLabel": "xyz789",
"deleted": false,
"contactDetails": PatientRelationshipContact
}
PatientRelationshipContact
Description
Details for a
Patient
/
Contact
that has been linked to in a
PatientRelationship
.
Fields
Field Name | Description |
---|---|
name -
String
|
|
contactInfo -
String
|
Additional information that should be displayed alongside the parent
PatientRelationship
|
relatedAccountId -
ID
|
The ID of the related
Patient /
Contact if there is one |
policyNumber -
String
|
Included only when related
Patient /
Contact has a
PatientRelationshipType of INSURER |
authorizationCode -
String
|
Included only when related
Patient /
Contact has a
PatientRelationshipType of INSURER |
Example
{
"name": "xyz789",
"contactInfo": "xyz789",
"relatedAccountId": 4,
"policyNumber": "xyz789",
"authorizationCode": "xyz789"
}
PatientRelationshipContactInput
Description
Used to specify details for a
Patient
/
Contact
that is being linked to in a
PatientRelationship
.
Fields
Input Field | Description |
---|---|
name -
String
|
Value can only be specified if a |
contactInfo -
String
|
Additional information that should be displayed alongside the parent
|
relatedAccountId -
ID
|
The ID of the related
|
policyNumber -
String
|
Can only be included when the
|
authorizationCode -
String
|
Can only be included when the
|
Example
{
"name": "abc123",
"contactInfo": "xyz789",
"relatedAccountId": "4",
"policyNumber": "xyz789",
"authorizationCode": "xyz789"
}
PatientRelationshipData
Description
A collection of
PatientRelationships
Fields
Field Name | Description |
---|---|
data -
[PatientRelationship]
|
Example
{"data": [PatientRelationship]}
PatientRelationshipType
Description
Allowed
PatientRelationship
types.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"FAMILY"
PatientResponsePayload
Phone
PhoneType
Description
Allowed telephone types.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
Example
"Mobile"
Practice
Description
Information about your practice.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
locations -
[PracticeLocation]
|
A room. |
appointmentTypes -
[AppointmentType]
|
|
paymentTypes -
[PracticePaymentType]
|
|
accessGroups -
[PracticeAccessGroups]
|
|
practiceNumbers -
[PracticeNumbers]
|
Example
{
"id": 4,
"locations": [PracticeLocation],
"appointmentTypes": [AppointmentType],
"paymentTypes": [PracticePaymentType],
"accessGroups": [PracticeAccessGroups],
"practiceNumbers": [PracticeNumbers]
}
PracticeAccessGroups
PracticeLocation
PracticeNumbers
PracticePaymentType
PracticeTemplateDocument
Description
A document template used by the practice.
Example
{
"id": 4,
"patientId": "4",
"path": "abc123",
"name": "xyz789",
"type": "xyz789",
"url": "xyz789",
"deleted": false,
"dateCreated": "2007-12-03",
"dateModified": "2007-12-03",
"uploadUrl": "xyz789",
"downloadUrl": "abc123"
}
PracticeTemplateDocumentData
Description
A collection of document templates and the related pagination information.
Fields
Field Name | Description |
---|---|
data -
[PracticeTemplateDocument]
|
|
pageInfo -
PageInfo
|
Example
{
"data": [PracticeTemplateDocument],
"pageInfo": PageInfo
}
Prescription
Description
A prescription for a patient.
Fields
Field Name | Description |
---|---|
patient -
Patient
|
|
doctor -
User
|
|
date -
Date
|
|
status -
String
|
|
drugs -
[PrescriptionDrug]
|
Example
{
"patient": Patient,
"doctor": User,
"date": "2007-12-03",
"status": "xyz789",
"drugs": [PrescriptionDrug]
}
PrescriptionData
Description
A collection of prescriptions and the related pagination information.
Fields
Field Name | Description |
---|---|
data -
[Prescription]
|
|
pageInfo -
PageInfo
|
Example
{
"data": [Prescription],
"pageInfo": PageInfo
}
PrescriptionDrug
PrivacyPolicy
Description
A privacy policy.
Fields
Field Name | Description |
---|---|
response -
String
|
Example
{"response": "abc123"}
Product
Description
The representation of a product.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
status -
String
|
|
productType -
ProductType
|
|
labels -
[ProductLabel]
|
|
itemCode -
String
|
|
name -
String
|
|
serialNumber -
String
|
|
tax -
Tax
|
|
stockLevel -
Int
|
|
price -
Float
|
|
cost -
Float
|
|
supplierName -
String
|
|
comments -
String
|
|
appointments -
[Product]
|
|
isBookable -
Boolean
|
|
duration -
Int
|
|
color -
String
|
|
isVideoConsultation -
Boolean
|
|
requiresPayment -
Boolean
|
|
requiresConfirmation -
Boolean
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
Example
{
"id": 4,
"status": "abc123",
"productType": "appointment",
"labels": [ProductLabel],
"itemCode": "xyz789",
"name": "abc123",
"serialNumber": "abc123",
"tax": Tax,
"stockLevel": 987,
"price": 123.45,
"cost": 987.65,
"supplierName": "xyz789",
"comments": "abc123",
"appointments": [Product],
"isBookable": false,
"duration": 123,
"color": "xyz789",
"isVideoConsultation": false,
"requiresPayment": true,
"requiresConfirmation": true,
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
ProductData
ProductDataInput
Description
The data used to define a new product.
Fields
Input Field | Description |
---|---|
productType -
ProductType
|
|
name -
String
|
|
price -
Float
|
|
itemCode -
String
|
|
membershipFrequency -
String
|
|
supplierName -
String
|
|
duration -
Int
|
|
color -
String
|
|
isBookable -
Boolean
|
|
serialNumber -
String
|
|
stockLevel -
Int
|
|
cost -
Float
|
|
comments -
String
|
|
isVideoConsultation -
Boolean
|
|
requiresPayment -
Boolean
|
|
requiresConfirmation -
Boolean
|
Example
{
"productType": "appointment",
"name": "xyz789",
"price": 987.65,
"itemCode": "abc123",
"membershipFrequency": "xyz789",
"supplierName": "abc123",
"duration": 987,
"color": "xyz789",
"isBookable": false,
"serialNumber": "xyz789",
"stockLevel": 987,
"cost": 987.65,
"comments": "xyz789",
"isVideoConsultation": false,
"requiresPayment": false,
"requiresConfirmation": false
}
ProductLabel
ProductResponsePayload
ProductType
Description
The type of product.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"appointment"
QueryOptions
Record
Description
An entry in a consultation.
Fields
Field Name | Description |
---|---|
id -
ID
|
|
consultationId -
String
|
|
sectionId -
String
|
|
sectionTitle -
String
|
|
recordType -
String
|
|
patient -
ID
|
|
doctorName -
String
|
|
term -
String
|
|
title -
String
|
|
date -
Date
|
|
start -
Date
|
|
snomed -
Snomed
|
|
observation -
String
|
|
dosage -
String
|
|
quantity -
String
|
|
batchNumber -
String
|
|
expiryDate -
String
|
|
repeat -
Int
|
|
sampleDate -
Date
|
|
injectionDate -
Date
|
|
fasting -
Boolean
|
|
comments -
String
|
|
createdAt -
Date
|
|
updatedAt -
Date
|
Example
{
"id": 4,
"consultationId": "abc123",
"sectionId": "xyz789",
"sectionTitle": "xyz789",
"recordType": "abc123",
"patient": "4",
"doctorName": "abc123",
"term": "abc123",
"title": "abc123",
"date": "2007-12-03",
"start": "2007-12-03",
"snomed": Snomed,
"observation": "abc123",
"dosage": "xyz789",
"quantity": "xyz789",
"batchNumber": "xyz789",
"expiryDate": "xyz789",
"repeat": 987,
"sampleDate": "2007-12-03",
"injectionDate": "2007-12-03",
"fasting": true,
"comments": "abc123",
"createdAt": "2007-12-03",
"updatedAt": "2007-12-03"
}
RecordData
ReviewStatus
Description
The review status of a letter.
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
Example
"NONE"
SharingToken
Fields
Field Name | Description |
---|---|
token -
String
|
Example
{"token": "xyz789"}
Snomed
String
Description
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
Tax
Token
UpdateContactDataAddressInput
UpdateContactDataInput
Description
Data representing the updated contact.
Fields
Input Field | Description |
---|---|
title -
String
|
|
first -
String
|
|
last -
String
|
|
email -
String
|
|
phones -
[UpdateContactDataPhoneInput]
|
|
address -
UpdateContactDataAddressInput
|
|
medicalSpecialty -
String
|
|
company -
String
|
Example
{
"title": "xyz789",
"first": "abc123",
"last": "abc123",
"email": "abc123",
"phones": [UpdateContactDataPhoneInput],
"address": UpdateContactDataAddressInput,
"medicalSpecialty": "abc123",
"company": "abc123"
}
UpdateContactDataPhoneInput
UpdateContactPhoneData
UpdateCustomAttributeData
UpdateInvoiceDataInput
UpdateInvoicePaymentDataInput
UpdateLetterDataInput
Description
Data defining how an existing letter should be updated.
Example
{
"patient": "xyz789",
"contact": "abc123",
"location": "xyz789",
"doctor": "xyz789",
"title": "abc123",
"body": "xyz789",
"date": "2007-12-03",
"reviewStatus": "NONE"
}
UpdateLineItemDataInput
UpdatePatientDataInput
Description
The data used to update a patient.
Example
{
"title": "xyz789",
"first": "abc123",
"last": "abc123",
"email": "xyz789",
"dob": "2007-12-03",
"gender": "xyz789",
"sex": "abc123",
"address": "abc123",
"city": "abc123",
"postcode": "abc123",
"country": "abc123",
"paymentReference": "abc123",
"communicationPreferences": PatientCommunicationPreferencesInput
}
UpdatePhoneData
User
Description
A user in the application.
Fields
Field Name | Description |
---|---|
id -
ID!
|
|
firstName -
String!
|
|
lastName -
String!
|
|
email -
String!
|
|
fullName -
String!
|
|
isDoctor -
Boolean
|
|
qualifications -
String
|
|
registration -
String
|
|
accessGroups -
[UserAccessGroup]
|
|
bookings -
BookingData
|
|
letters -
LetterData
|
|
Example
{
"id": "4",
"firstName": "xyz789",
"lastName": "xyz789",
"email": "abc123",
"fullName": "xyz789",
"isDoctor": true,
"qualifications": "xyz789",
"registration": "xyz789",
"accessGroups": [UserAccessGroup],
"bookings": BookingData,
"letters": LetterData
}