How To Create Orders
You will need to add the token as part of the "Authorization" header, using the "Bearer" authentication scheme. Here are the steps to include it in the header:
Order Sections
-
requisitionNumber:
unique identifiers that allow every requisition to be tracked. -
patient:
patient information. There must be a patient object present to create an order. -
products:
product list is required with at least one product. Check the Panel Selection for more information on how to select the available tests. -
clinical:
an optional section that defines personal and family clinical information about the patient-
personalCancerHistory:
personal history of cancer. It's organized by cancer types inputs, each with its specific questions (if necessary). -
familyCancerHistory:
family history of cancer. It's organized by the family relationship type and its cancer history. -
cancerRisk:
breast cancer risk information. -
boneMarrowTransplantRecipient:
bone marrow transplants may use cells from your own body (autologous transplant) or from a donor (allogeneic transplant). If allogeneic, the test is invalid. -
bloodTransfusionRecipient:
information on last blood transfusion. If within 28 days, the test is invalid.
-
-
billing:
an optional section that defines the billing information detail such as insurance information and test/billing specific authorization information -
providerAccounts:
provider specific information. If list exists at least one Provider Account object is required -
specimens:
specimen/sample specific information associated with this order. -
notes:
any free-form notes associated with this order. -
testPreferenceCode:
An optional field that contains the test preference code.
Panel Selection
Test(s) | GraphQL API - products: [ProductInput!]! |
---|---|
MYRIAD BRACANALYSIS AND MYRISK / NOTE 2 TESTS |
|
MYRIAD INTEGRATED BRACANALYSIS / BRCA 1 BRCA 2 ONLY |
|
MYRIAD MULTISITE 3 W/ OPTION TO REFLEX |
|
MYRIAD COLARIS AP AND MYRISK / NOTE 2 TESTS |
|
MYRIAD COLARIS PLUS AND MYRISK / NOTE 2 TESTS |
|
MYRIAD COLARIS AP PLUS |
|
MYRIAD COLARIS PLUS |
|
MYRIAD MYRISK UPDATE TEST | Not Yet Available via Order Gateway |
MYRIAD SINGLE-SITE INCLUDE GENE AND MUTATION NAME | Not Yet Available via Order Gateway |
MYRIAD PROLARIS PROSTATE CANCER PROGNOSTIC TEST |
|
Sample Payloads
mutation createOrder {
createOrder(order: {
requisitionNumber: "a1b2c3d4e5f6"
patient: {
firstName: "John"
lastName: "Doe"
dob: "1988-11-13"
genderCode: MALE
address: {
street: "Example St."
city: "New York"
stateCode: NY
postalCode: "10001"
}
mobilePhoneNumber: "415-555-5555"
emailAddress: "john@doe.com"
}
products: [{
product: BRACANALYSIS
}]
clinical: {
personalCancerHistory: [
{
prostate: {
diagnosisAge: 25
currentlyBeingTreated: false
diagnosisDetails: {
gleasonScore: FIVE_PLUS_FOUR_EQUAL_NINE
metastatic: true
}
}
}
]
familyCancerHistory: [
{
relationshipTypeCode: FATHER
cancerHistory: [{
cancerSiteCode: PROSTATE
diagnosisAge: {
age: 23
}
}]
}
{
relationshipTypeCode: MOTHER
cancerHistory: [{
cancerSiteCode: BREAST_DCIS
diagnosisAge: {
range: {
lowerAge: 25
upperAge: 33
}
}
}]
}
]
ancestry: [HISPANIC_LATINO, BLACK_AFRICAN]
}
billing: {
insurance: {
insurancePolicies: [{
relationshipToInsuredCode: SELF
policyNumber: "123123"
payerName: "Doe John"
policyHolderFirstName: "Doe"
policyHolderLastName: "John"
policyHolderDateOfBirth: "1991-11-01"
}]
}
}
providerAccounts: [
{
provider: {
firstName: "John",
lastName: "Doe",
identifiers: [
{
type: NPI
use: OFFICIAL
value: "12345"
}
]
}
location: {
address: {
city: "New York"
postalCode: "10001"
stateCode: NY
street: "Example St."
}
}
organization: {
identifiers: [{
type: XX
use: OFFICIAL
value: "12345"
}]
}
role: ORDERING
}
]
specimens: [{
germline: {
requestFromPatient: true
}
}]
}) { id }
}
Order Submission
- Format the Authorization Header:
You should include the JWT in the "Authorization" header of your HTTP request. The header should look like this:
Authorization: Bearer <your-JWT-token>
- Replace
<your-JWT-token>
with the actual JWT token you generated in step 1.
- Make the Request:
You can use various programming languages and libraries to send HTTP requests to the GraphQL API. Below are a few examples:
curl --X POST --location '<https://example.com/graphql>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your-JWT-token>' \
--data-raw '{"query":"mutation createOrder($order: OrderInput!) {createOrder(order: $order) {id}}","variables":{"order": <your-order-payload> }}'
- Replace
<your-JWT-token>
with the JWT token obtained in step 1.
- Handle the Response:
Once you send the request, you will receive a response from the GraphQL API with the ID of the created entry. You can parse and handle the data according to your application's needs.
Order Submission With Attachments
We also support the ability to submit orders with attachments. You can include attachments in your order payload and send them as part of the request. Here's how you can do it:
curl --X POST --location '<https://example.com/graphql>' \
--header 'Authorization: Bearer <your-JWT-token>' \
-F operations='{"query":"mutation createOrder($order: OrderInput!) {createOrder(order: $order) {id}}","variables":{"order": { <your-order-payload>, attachments: null }}}' \
-F map='{"0": ["variables.order.attachments.0"], "1": ["variables.order.attachments.1"], "2": ["variables.order.attachments.2"] }' \
-F 0=@<path-to-the-file-0> \
-F 1=@<path-to-the-file-1> \
-F 2=@<path-to-the-file-2>