export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K]; }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe; }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe; }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; /** An extended ISO 8601 date string in the format YYYY-MM-DD. */ AWSDate: any; /** An extended ISO 8601 date and time string in the format YYYY-MM-DDThh:mm:ss.sssZ. */ AWSDateTime: any; /** An email address in the format local-part@domain-part as defined by RFC 822. */ AWSEmail: any; /** A phone number. This value is stored as a string. Phone numbers can contain either spaces or hyphens to separate digit groups. Phone numbers without a country code are assumed to be US/North American numbers adhering to the North American Numbering Plan (NANP). */ AWSPhone: any; }; export type Address = { __typename?: 'Address'; city: Scalars['String']; country: Scalars['String']; name?: Maybe; postalCode: Scalars['String']; state: Scalars['String']; street1: Scalars['String']; street2?: Maybe; }; export type AddressInput = { city: Scalars['String']; country: Scalars['String']; name?: InputMaybe; postalCode: Scalars['String']; state: Scalars['String']; street1: Scalars['String']; street2?: InputMaybe; }; export type Allergen = { __typename?: 'Allergen'; id: Scalars['ID']; name: Scalars['String']; rxcui?: Maybe; }; export type AllergenFilter = { name?: InputMaybe; }; export type AllergenInput = { allergenId: Scalars['ID']; comment?: InputMaybe; onset?: InputMaybe; }; export type Catalog = { __typename?: 'Catalog'; id: Scalars['ID']; name: Scalars['String']; templates: Array>; treatments: Array>; }; export type Client = { __typename?: 'Client'; appType?: Maybe; id: Scalars['ID']; name?: Maybe; secret?: Maybe; }; export declare enum ConceptType { Drug = "DRUG", Package = "PACKAGE", Product = "PRODUCT" } export type Diagnosis = { __typename?: 'Diagnosis'; code: Scalars['String']; name: Scalars['String']; type: DiagnosisType; }; export declare enum DiagnosisType { Icd10 = "ICD10" } export type DispenseUnit = { __typename?: 'DispenseUnit'; name: Scalars['String']; }; export type DrugFilter = { code?: InputMaybe; name?: InputMaybe; }; export type Fill = { __typename?: 'Fill'; filledAt?: Maybe; id: Scalars['ID']; order: Order; prescription?: Maybe; requestedAt: Scalars['AWSDateTime']; state: FillState; treatment: Treatment; }; export type FillInput = { /** ID of a `Prescription` (optional for OTCs) */ prescriptionId?: InputMaybe; /** ID of a `Treatment` (optional if `prescriptionId` is set) */ treatmentId?: InputMaybe; }; export declare enum FillState { Canceled = "CANCELED", New = "NEW", Scheduled = "SCHEDULED", Sent = "SENT" } export declare enum FulfillmentType { MailOrder = "MAIL_ORDER", PickUp = "PICK_UP" } export type FulfillmentState = 'SENT' | 'RECEIVED' | 'READY' | 'PICKED_UP' | 'FILLING' | 'SHIPPED' | 'DELIVERED'; export type Invite = { __typename?: 'Invite'; createdAt: Scalars['AWSDateTime']; email: Scalars['String']; expired: Scalars['Boolean']; expiresAt: Scalars['AWSDateTime']; roles?: Maybe>>; url: Scalars['String']; }; export type InviteInput = { email: Scalars['String']; /** A list of role ids */ roles?: InputMaybe>>; }; export type LatLongSearch = { latitude?: InputMaybe; longitude?: InputMaybe; /** Search radius in miles */ radius?: InputMaybe; }; export type MedHistoryInput = { active: Scalars['Boolean']; comment?: InputMaybe; medicationId: Scalars['ID']; }; export type MedicalEquipment = Treatment & { __typename?: 'MedicalEquipment'; codes: TreatmentCodes; description?: Maybe; id: Scalars['ID']; name: Scalars['String']; }; export type Medication = Treatment & { __typename?: 'Medication'; brandName?: Maybe; codes: TreatmentCodes; concept: ConceptType; controlled: Scalars['Boolean']; description?: Maybe; form?: Maybe; genericName?: Maybe; id: Scalars['ID']; manufacturer?: Maybe; name: Scalars['String']; schedule?: Maybe; strength?: Maybe; /** Null implies a medication cant be prescribed */ type?: Maybe; }; export type MedicationFilter = { drug?: InputMaybe; package?: InputMaybe; product?: InputMaybe; }; export declare enum MedicationType { /** Over-the-Counter */ Otc = "OTC", /** Prescription */ Rx = "RX" } export type Mutation = { __typename?: 'Mutation'; /** Add role to user as an organization's admin */ addRole: User; addToCatalog: Treatment; /** Create a new `Order` for a specific `Patient` */ createOrder: Order; /** Create a new `Patient` record */ createPatient: Patient; /** Create a new `Prescription` associated with the logged in prescriber. A `patientId` is returned after creating a `Patient` with the `createPatient` mutation. `treatmentId` can be searched with the `medications` or `medicalEquipment` queries. */ createPrescription: Prescription; createPrescriptionTemplate?: Maybe; /** Creates multiple new `Prescription` associated with the logged in prescriber. */ createPrescriptions: Array>; createWebhookConfig: WebhookConfig; deletePrescriptionTemplate: PrescriptionTemplate; deleteWebhookConfig?: Maybe; /** Create a new invite to the current authenticated organization for the specified email */ inviteUser: Invite; removeFromCatalog: Treatment; removePatientAllergy: Patient; /** Removes a preferred pharmacy to a patient */ removePatientPreferredPharmacy: Patient; /** Remove role from user as an organzation's admin */ removeRole: User; rotateSecret: Client; /** Update an existing `Patient` record */ updatePatient: Patient; updatePrescriptionTemplate: PrescriptionTemplate; /** Allow a user to update their own profile */ updateProfile: User; updateWebhookConfig: WebhookConfig; /** Start account verification. Only applicable for Doctors */ verifyAccount: Verification; }; export type MutationAddRoleArgs = { input: RoleInput; }; export type MutationAddToCatalogArgs = { catalogId: Scalars['ID']; treatmentId: Scalars['ID']; }; export type MutationCreateOrderArgs = { address: AddressInput; externalId?: InputMaybe; fills: Array; patientId: Scalars['ID']; pharmacyId?: InputMaybe; }; export type MutationCreatePatientArgs = { address?: InputMaybe; allergies?: InputMaybe>>; dateOfBirth: Scalars['AWSDate']; email?: InputMaybe; externalId?: InputMaybe; gender?: InputMaybe; medicationHistory?: InputMaybe>>; name: NameInput; phone: Scalars['AWSPhone']; preferredPharmacies?: InputMaybe>>; sex: SexType; }; export type MutationCreatePrescriptionArgs = { daysSupply?: InputMaybe; diagnoses?: InputMaybe>>; dispenseAsWritten?: InputMaybe; dispenseQuantity: Scalars['Float']; dispenseUnit: Scalars['String']; effectiveDate?: InputMaybe; externalId?: InputMaybe; instructions: Scalars['String']; notes?: InputMaybe; patientId: Scalars['ID']; fillsAllowed: Scalars['Int']; treatmentId: Scalars['ID']; }; export type MutationCreatePrescriptionTemplateArgs = { catalogId: Scalars['ID']; daysSupply?: InputMaybe; dispenseAsWritten?: InputMaybe; dispenseQuantity?: InputMaybe; dispenseUnit?: InputMaybe; instructions?: InputMaybe; notes?: InputMaybe; fillsAllowed?: InputMaybe; treatmentId: Scalars['ID']; }; export type MutationUpdatePrescriptionTemplateArgs = { catalogId: Scalars['ID']; templateId: Scalars['ID']; dispenseAsWritten?: InputMaybe; dispenseQuantity?: InputMaybe; dispenseUnit?: InputMaybe; fillsAllowed?: InputMaybe; instructions?: InputMaybe; notes?: InputMaybe; }; export type MutationCreatePrescriptionsArgs = { prescriptions: Array>; }; export type MutationCreateWebhookConfigArgs = { filters?: InputMaybe>>; name?: InputMaybe; sharedSecret?: InputMaybe; url: Scalars['String']; }; export type MutationDeletePrescriptionTemplateArgs = { catalogId: Scalars['ID']; templateId: Scalars['ID']; }; export type MutationDeleteWebhookConfigArgs = { id: Scalars['String']; }; export type MutationInviteUserArgs = { input: InviteInput; }; export type MutationRemoveFromCatalogArgs = { catalogId: Scalars['ID']; treatmentId: Scalars['ID']; }; export type MutationRemovePatientAllergyArgs = { allergenId: Scalars['ID']; id: Scalars['ID']; }; export type MutationRemovePatientPreferredPharmacyArgs = { patientId: Scalars['ID']; pharmacyId: Scalars['ID']; }; export type MutationRemoveRoleArgs = { input: RoleInput; }; export type MutationRotateSecretArgs = { id: Scalars['ID']; }; export type MutationUpdatePatientArgs = { address?: InputMaybe; allergies?: InputMaybe>>; email?: InputMaybe; externalId?: InputMaybe; gender?: InputMaybe; id: Scalars['ID']; medicationHistory?: InputMaybe>>; name?: InputMaybe; phone?: InputMaybe; preferredPharmacies?: InputMaybe>>; }; export type MutationUpdateProfileArgs = { input: ProfileInput; }; export type MutationUpdateWebhookConfigArgs = { filters?: InputMaybe>>; id: Scalars['ID']; name?: InputMaybe; sharedSecret?: InputMaybe; url?: InputMaybe; }; export type Name = { __typename?: 'Name'; first: Scalars['String']; /** Convenience method for getting a formated name */ full: Scalars['String']; last: Scalars['String']; middle?: Maybe; title?: Maybe; }; export type NameInput = { first: Scalars['String']; last: Scalars['String']; middle?: InputMaybe; title?: InputMaybe; }; export type Order = { __typename?: 'Order'; address?: Maybe
; createdAt: Scalars['AWSDateTime']; externalId?: Maybe; fills: Array; fulfillment?: Maybe; id: Scalars['ID']; patient: Patient; /** The pharmacy that owns this `Order` */ pharmacy?: Maybe; state: OrderState; }; export type OrderFilter = { patientId?: InputMaybe; patientName?: InputMaybe; state?: InputMaybe; }; export type OrderFulfillment = { __typename?: 'OrderFulfillment'; carrier?: Maybe; state: FulfillmentState; trackingNumber?: Maybe; type: FulfillmentType; minutesUntilReady?: Maybe; pharmacyEstimatedReadyAt?: Maybe; }; export declare enum OrderState { Canceled = "CANCELED", Completed = "COMPLETED", Error = "ERROR", Pending = "PENDING", Placed = "PLACED", Routing = "ROUTING" } export declare enum OrgType { Pharmacy = "PHARMACY", Prescriber = "PRESCRIBER" } export type Organization = { __typename?: 'Organization'; NPI?: Maybe; address?: Maybe
; email?: Maybe; fax?: Maybe; id: Scalars['ID']; name: Scalars['String']; phone?: Maybe; type?: Maybe; }; export type PackageFilter = { code?: InputMaybe; name?: InputMaybe; product: Scalars['ID']; type?: InputMaybe; }; export type Patient = { __typename?: 'Patient'; address?: Maybe
; allergies?: Maybe>>; dateOfBirth: Scalars['AWSDate']; email?: Maybe; externalId?: Maybe; gender?: Maybe; id: Scalars['ID']; medicationHistory?: Maybe>>; name: Name; orders?: Maybe>>; phone: Scalars['AWSPhone']; preferredPharmacies?: Maybe>>; prescriptions?: Maybe>>; sex: SexType; }; export type PatientOrdersArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type PatientPrescriptionsArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type PatientAllergy = { __typename?: 'PatientAllergy'; allergen: Allergen; comment?: Maybe; onset?: Maybe; }; export type PatientFilter = { name?: InputMaybe; }; export type PatientMedication = { __typename?: 'PatientMedication'; active: Scalars['Boolean']; comment?: Maybe; medication: Medication; prescription?: Maybe; }; export type PatientOrderFilter = { state?: InputMaybe; }; export type PatientPrescriptionFilter = { prescriberId?: InputMaybe; state?: InputMaybe; }; export type DayOfWeek = 'SUNDAY' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY'; export type PharmacyHours = { openFrom: string; openUntil: string; dayOfWeek: DayOfWeek; is24Hr: boolean; timezone: string; }; export type PharmacyOpenEvent = { type: string; datetime: Scalars['AWSDateTime']; }; export type PharmacyCloseEvent = { type: string; datetime: Scalars['AWSDateTime']; }; export type PharmacyOpen24HrEvent = { type: string; }; export type PharmacyEvent = PharmacyOpenEvent | PharmacyCloseEvent | PharmacyOpen24HrEvent; export type PharmacyEvents = { open: PharmacyEvent; close: PharmacyEvent; }; export type Pharmacy = { __typename?: 'Pharmacy'; NPI?: Maybe; address?: Maybe
; fax?: Maybe; fulfillmentTypes?: Maybe>>; id: Scalars['ID']; name: Scalars['String']; phone?: Maybe; is24Hr?: boolean; nextEvents?: PharmacyEvents; hours?: [PharmacyHours]; isOpen?: boolean; }; export type Prescription = { __typename?: 'Prescription'; daysSupply?: Maybe; diagnoses?: Maybe>>; dispenseAsWritten?: Maybe; dispenseQuantity: Scalars['Float']; dispenseUnit: Scalars['String']; effectiveDate: Scalars['AWSDate']; expirationDate: Scalars['AWSDate']; externalId?: Maybe; fills: Array>; id: Scalars['ID']; instructions: Scalars['String']; notes?: Maybe; patient: Patient; prescriber: Provider; fillsAllowed: Scalars['Int']; fillsRemaining: Scalars['Int']; state: PrescriptionState; treatment: Treatment; writtenAt: Scalars['AWSDateTime']; }; export type PrescriptionFilter = { patientId?: InputMaybe; patientName?: InputMaybe; prescriberId?: InputMaybe; state?: InputMaybe; }; export type PrescriptionInput = { /** Number of days a single fill lasts */ daysSupply?: InputMaybe; /** ICD10 codes for patient diagnosises */ diagnoses?: InputMaybe>>; /** True if substitutes are not allowed at the pharmacy */ dispenseAsWritten?: InputMaybe; /** Amount of a `dispenseUnit` per fill */ dispenseQuantity: Scalars['Float']; /** Unit to dispense treatment in */ dispenseUnit: Scalars['String']; /** Date when the script is first valid */ effectiveDate?: InputMaybe; /** Reference ID for linking to external objects */ externalId?: InputMaybe; /** Prescriber instructions for patient */ instructions: Scalars['String']; /** Prescriber notes, available to pharmacist */ notes?: InputMaybe; /** ID of the patient that this prescription belongs to */ patientId: Scalars['ID']; /** Number of fills allowed before expiration of script */ fillsAllowed: Scalars['Int']; /** ID of the treatment being prescribed */ treatmentId: Scalars['ID']; }; export declare enum PrescriptionState { Active = "ACTIVE", Depleted = "DEPLETED", Expired = "EXPIRED", Canceled = "CANCELED" } export type PrescriptionTemplate = { __typename?: 'PrescriptionTemplate'; daysSupply?: Maybe; dispenseAsWritten?: Maybe; dispenseQuantity?: Maybe; dispenseUnit?: Maybe; id: Scalars['ID']; instructions?: Maybe; notes?: Maybe; fillsAllowed?: Maybe; treatment: Treatment; name: Maybe; isPrivate: Scalars['Boolean']; }; export type ProductFilter = { code?: InputMaybe; drug: Scalars['ID']; name?: InputMaybe; type?: InputMaybe; }; export type ProfileInput = { address?: InputMaybe; fax?: InputMaybe; name?: InputMaybe; npi?: InputMaybe; phone?: InputMaybe; /** This should be a base64 encoded string of the signature image */ signature?: InputMaybe; }; export type Provider = { __typename?: 'Provider'; NPI?: Maybe; address?: Maybe
; email: Scalars['AWSEmail']; externalId?: Maybe; fax?: Maybe; id: Scalars['ID']; name: Name; organizations: Array; phone: Scalars['AWSPhone']; }; export type Query = { __typename?: 'Query'; /** Get list of allergens, filtered optionally by name (fuzzy search) */ allergens?: Maybe>>; /** Get a catalog by id */ catalog?: Maybe; /** Get catalogs associated with caller's organization */ catalogs: Array>; clients: Array>; /** Get list of Dispense Units for use in creating a prescription */ dispenseUnits: Array>; /** Get a fill */ fill?: Maybe; /** See all invitations that the organization has made */ invites?: Maybe>>; /** Retrieve the profile of the currently authenticated user */ me: User; /** Get list of Medical Equipment */ medicalEquipment: Array>; /** Get list of SearchMedication concepts that contain the specified name */ medicationConcepts?: Maybe>>; /** Get list of forms related to a SearchMedication of type ROUTE. These are returned as prescribable medications */ medicationForms?: Maybe>>; /** Get list of Medicationn packages related to a Medication of type PRODUCT */ medicationPackages?: Maybe>>; /** Get list of Medication products related to a Medication of type DRUG */ medicationProducts?: Maybe>>; /** Get list of routes related to a SearchMedication of type STRENGTH */ medicationRoutes?: Maybe>>; /** Get list of strengths related to a SearchMedication of type CONCEPT */ medicationStrengths?: Maybe>>; /** Get list of medications */ medications: Array>; /** Get an order by ID */ order?: Maybe; /** Get all orders for a patient */ orders: Array>; /** Get the organization the user is currently authenticated with */ organization: Organization; /** Get all the orgnaizations the user belongs to */ organizations: Array>; /** Get a patient by ID */ patient?: Maybe; /** Get all patients associated with caller's organization */ patients: Array>; /** Search pharmacies */ pharmacies: Array>; /** Get a pharmacy by ID */ pharmacy?: Maybe; /** Get a prescription by ID */ prescription?: Maybe; /** Get all prescriptions associated with caller's organization */ prescriptions: Array>; /** Retrieve a list of available roles */ roles?: Maybe>>; /** Retrieve a list of users for an organization */ users?: Maybe>>; /** Retrieve all verifications for yourself */ verifications?: Maybe>>; webhooks?: Maybe>>; }; export type QueryAllergensArgs = { filter?: InputMaybe; }; export type QueryCatalogArgs = { id?: InputMaybe; }; export type QueryFillArgs = { id: Scalars['ID']; }; export type QueryMedicalEquipmentArgs = { after?: InputMaybe; first?: InputMaybe; name?: InputMaybe; }; export type QueryMedicationConceptsArgs = { name: Scalars['String']; }; export type QueryMedicationFormsArgs = { id: Scalars['String']; }; export type QueryMedicationPackagesArgs = { id: Scalars['String']; }; export type QueryMedicationProductsArgs = { id: Scalars['String']; }; export type QueryMedicationRoutesArgs = { id: Scalars['String']; }; export type QueryMedicationStrengthsArgs = { id: Scalars['String']; }; export type QueryMedicationsArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type QueryOrderArgs = { id: Scalars['ID']; }; export type QueryOrdersArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type QueryPatientArgs = { id: Scalars['ID']; }; export type QueryPatientsArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type QueryPharmaciesArgs = { after?: InputMaybe; first?: InputMaybe; location?: InputMaybe; name?: InputMaybe; type?: InputMaybe; }; export type QueryPharmacyArgs = { id: Scalars['ID']; }; export type QueryPrescriptionArgs = { id: Scalars['ID']; }; export type QueryPrescriptionsArgs = { after?: InputMaybe; filter?: InputMaybe; first?: InputMaybe; }; export type Role = { __typename?: 'Role'; description?: Maybe; id: Scalars['ID']; name?: Maybe; }; export type RoleInput = { roleId: Scalars['String']; userId: Scalars['String']; }; export declare enum ScheduleType { I = "I", Ii = "II", Iii = "III", Iv = "IV", V = "V" } export type SearchMedication = { __typename?: 'SearchMedication'; id: Scalars['ID']; name: Scalars['String']; type?: Maybe; }; export declare enum SearchMedicationType { Concept = "CONCEPT", Form = "FORM", Route = "ROUTE", Strength = "STRENGTH" } export declare enum SexType { Female = "FEMALE", Male = "MALE", Unknown = "UNKNOWN" } export type Treatment = { codes: TreatmentCodes; description?: Maybe; id: Scalars['ID']; name: Scalars['String']; __typename?: 'MedicalEquipment' | 'Compound' | 'Medication'; }; export type TreatmentCodes = { __typename?: 'TreatmentCodes'; HCPCS?: Maybe; SKU?: Maybe; packageNDC?: Maybe; productNDC?: Maybe; rxcui?: Maybe; }; export type TreatmentOption = { __typename?: 'TreatmentOption'; id: Scalars['ID']; name: Scalars['String']; ndc: Scalars['String']; type: MedicationType; route?: Scalars['String']; form?: Scalars['String']; strength?: Scalars['String']; }; export type User = { __typename?: 'User'; address?: Maybe
; email?: Maybe; externalId?: Maybe; fax?: Maybe; id: Scalars['ID']; name?: Maybe; npi?: Maybe; phone?: Maybe; roles?: Maybe>>; /** A base64 encoded string of the signature picture that can be rendered */ signature?: Maybe; /** Verification status of the account. If not a Doctor, wil be NOT_APPLICABLE */ verificationStatus: Scalars['String']; }; export type Verification = { __typename?: 'Verification'; clientSecret: Scalars['String']; createdAt: Scalars['AWSDateTime']; expired: Scalars['Boolean']; lastError?: Maybe; status: Scalars['String']; verifyUrl: Scalars['String']; }; export type WebhookConfig = { __typename?: 'WebhookConfig'; filters?: Maybe>>; id: Scalars['ID']; name?: Maybe; url?: Maybe; }; declare const PERMISSIONS_ARR: readonly ["create:order", "edit:profile", "manage:organization", "manage:user_roles", "read:client", "read:invite", "read:order", "read:organization", "read:patient", "read:prescription", "read:profile", "read:user_roles", "read:webhook_config", "update:client_keys", "update:order", "update:patient", "update:prescription", "write:client", "write:invite", "write:order", "write:patient", "write:prescription", "write:webhook_config"]; export type Permission = (typeof PERMISSIONS_ARR)[number]; export {};