createContactLensPrescription
Creates a contact lense with a prescription.
CreateContactLensPrescriptionMutationInput
Autogenerated input type of CreateContactLensPrescriptionMutation
- clientMutationId: String
A unique identifier for the client performing the mutation.
- userId: ID!required
ID of user
- createdById: ID!required
ID of user
- leftEye: ProductVariantSpecificationInput
A specification (characteristics) for the contact lens product variant for the left eye
- rightEye: ProductVariantSpecificationInput
A specification (characteristics) for the contact lens product variant for the right eye
- patient: PatientInput!required
- prescribingLocationId: ID
The location where the prescription was issued
- prescriptionToReplaceId: ID
The prescription to be replaced
- validityPeriod: PrescriptionValidityPeriodInput!required
The validity period of the prescription, including start and end dates
- doctor: OpticalPrescriptionDoctorInput!required
CreateContactLensPrescriptionMutationPayload
Autogenerated return type of CreateContactLensPrescriptionMutation.
- clientMutationId: String
A unique identifier for the client performing the mutation.
- confirmReplacementUrl: Url
- errors: [InputError!]!
Validation errors
- prescription: ContactLensPrescription
Query
mutation($input: CreateContactLensPrescriptionMutationInput!) {
createContactLensPrescription(input: $input) {
prescription {
id
doctor {
addressLine1
addressLine2
city
countryCode
postalCode
region
locationName
doctorsName
phoneNumber
isThirdPartyLocation
}
leftEye {
product {
id
name
}
properties {
name
value
}
}
patient {
dateOfBirth
firstName
lastName
personalIdentityNumber
pmsPatientIdentifier
}
status
validityPeriod {
expiryDate
startDate
}
url
prescribingLocation {
id
}
createdBy {
id
}
}
}
}Variables
{
"input": {
"userId": "AccountHolder-XL3FBMGL86",
"validityPeriod": {
"startDate": "2021-05-19",
"expiryDate": "2120-05-19"
},
"patient": {
"firstName": "Bob",
"lastName": "Carpe",
"dateOfBirth": "1980-02-02",
"personalIdentityNumber": "19920801-1234",
"pmsPatientIdentifier": "ABC123"
},
"leftEye": {
"productId": "Product-6DPSXO6DEDY",
"properties": [
{
"name": "power",
"value": "+1.00"
},
{
"name": "bc",
"value": "9.0"
},
{
"name": "dia",
"value": "14.2"
}
]
},
"doctor": {
"doctorsName": "Gerald Fields",
"phoneNumber": "01234",
"locationName": "Dr Hype",
"addressLine1": "Humphries Rd",
"city": "Utah City",
"countryCode": "US",
"postalCode": "84101",
"region": "UT",
"isThirdPartyLocation": true
},
"prescribingLocationId": "Location-9R3TMR8XMV4",
"createdById": "StaffMember-WVNFD3KPVRD"
}
}Response
{
"data": {
"createContactLensPrescription": {
"prescription": {
"id": "ContactLensPrescription-XD2IP77V26N",
"doctor": {
"addressLine1": "(4000) Alamaro Street",
"addressLine2": null,
"city": "Los Angeles",
"countryCode": "US",
"postalCode": "90210",
"region": "CA",
"locationName": "Dr Hype",
"doctorsName": "Gerald Fields",
"phoneNumber": "01234",
"isThirdPartyLocation": true
},
"leftEye": {
"product": {
"id": "Product-6DPSXO6DEDY",
"name": "1-Day Acuvue Moist 30 pack"
},
"properties": [
{
"name": "power",
"value": "+1.00"
},
{
"name": "bc",
"value": "9.0"
},
{
"name": "dia",
"value": "14.2"
}
]
},
"patient": {
"dateOfBirth": "1980-02-02",
"firstName": "Bob",
"lastName": "Carpe",
"personalIdentityNumber": "19920801-1234",
"pmsPatientIdentifier": "ABC123"
},
"status": "approved",
"validityPeriod": {
"expiryDate": "2120-05-19",
"startDate": "2021-05-19"
},
"url": "http://acme.platform.localhost:3000/en-US/contact-lens-prescriptions/XD2IP77V26N",
"prescribingLocation": {
"id": "Location-9R3TMR8XMV4"
},
"createdBy": {
"id": "StaffMember-WVNFD3KPVRD"
}
}
}
}
}