felicity-lims/webapp/graphql/worksheet.queries.ts

168 lines
2.9 KiB
TypeScript
Raw Normal View History

2021-04-09 06:37:58 +08:00
import gql from 'graphql-tag';
export const GET_ALL_WORKSHEET_TEMPLATES = gql`
query getAllWorksheetTemplates {
worksheetTemplateAll {
2021-09-27 23:45:22 +08:00
uid
name
reserved
numberOfSamples
rows
cols
rowWise
worksheetType
2022-03-19 20:41:29 +08:00
instrumentUid
2021-09-27 23:45:22 +08:00
instrument {
uid
name
2021-04-09 06:37:58 +08:00
}
2022-03-19 20:41:29 +08:00
sampleTypeUid
2021-09-27 23:45:22 +08:00
sampleType {
uid
name
}
description
2022-03-19 20:41:29 +08:00
analysisUid
analysis {
2021-09-27 23:45:22 +08:00
uid
name
}
state
2021-04-09 06:37:58 +08:00
}
}`;
2021-04-18 18:54:07 +08:00
export const GET_ALL_WORKSHEETS = gql`
2022-12-24 05:21:22 +08:00
query getAllWorksheets($first: Int!, $after: String, $before: String, $status: String!, $text: String!, $sortBy: [String!] = ["-uid"]) {
worksheetAll(pageSize: $first, afterCursor: $after, beforeCursor: $before, status: $status, text: $text, sortBy: $sortBy) {
2021-09-27 23:45:22 +08:00
totalCount
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
items {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
worksheetId
numberOfSamples
assignedCount
analyst {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
auth{
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
userName
2021-04-18 18:54:07 +08:00
}
2021-09-27 23:45:22 +08:00
firstName
lastName
}
instrument {
uid
name
2021-04-18 18:54:07 +08:00
}
2022-03-19 20:41:29 +08:00
analysis {
2021-09-27 23:45:22 +08:00
uid
name
}
state
createdAt
2021-04-18 18:54:07 +08:00
}
}
}`;
export const GET_WORKSHEET_BY_UID = gql`
2023-03-19 23:21:32 +08:00
query getWorkSheetByUid($worksheetUid: FelicityID!) {
2021-04-18 18:54:07 +08:00
worksheetByUid(worksheetUid: $worksheetUid) {
uid
2021-09-27 23:45:22 +08:00
worksheetId
numberOfSamples
assignedCount
reserved
state
createdAt
analyst {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
auth{
uid
userName
}
firstName
lastName
2021-04-18 18:54:07 +08:00
}
2021-09-27 23:45:22 +08:00
sampleType {
name
name
}
instrument {
uid
name
}
template {
uid
name
}
2022-03-19 20:41:29 +08:00
analysis {
2021-09-27 23:45:22 +08:00
uid
name
}
analysisResults {
uid
result
status
worksheetPosition
retest
reportable
method {
2021-04-18 18:54:07 +08:00
uid
name
}
2021-09-27 23:45:22 +08:00
instrument {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
name
}
analysis {
uid
name
2022-04-09 22:57:06 +08:00
unitUid
unit {
uid
name
}
2021-12-23 16:56:49 +08:00
resultOptions {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
optionKey
value
2021-04-18 18:54:07 +08:00
}
2021-09-27 23:45:22 +08:00
}
sample {
uid
sampleId
priority
2021-12-23 16:56:49 +08:00
analysisRequest {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
client {
uid
name
2021-04-18 18:54:07 +08:00
}
2021-09-27 23:45:22 +08:00
patient {
2021-04-18 18:54:07 +08:00
uid
2021-09-27 23:45:22 +08:00
firstName
lastName
clientPatientId
patientId
2021-04-18 18:54:07 +08:00
}
}
qcLevel {
uid
level
}
2021-04-18 18:54:07 +08:00
}
}
}
}`;