You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Current »
Purpose
This WS allows to find Medication registry Jobs in the Admin panel using search parameters.
Key points
This is a graphQl query method used in the Administration panel only
Only authenticated and authorized NHS employee with appropriate scope can search Medication registry Jobs
Query returns a list of Medication registry Jobs filtered by search parameters
Specification
Specification for medicationRegistryJobsQuery
"Reads and enables pagination through a set of `MedicationRegistryJob`."
medicationRegistryJobs(
"A condition to be used in determining which values should be returned by the collection."
filter: MedicationRegistryJobFilter
"The method to use when ordering collection items."
orderBy: MedicationRegistryJobOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): MedicationRegistryJobConnection!
"""
Filter for Medication registry job.
"""
input MedicationRegistryJobFilter {
"Medication registry job status filters."
status: JobStatus
}
"""
List of fields to sort both asc and desc side `MedicationRegistryJob`.
"""
enum MedicationRegistryJobOrderBy {
"Sort Medication registry job by started at in ascending order"
STARTED_AT_ASC
"Sort Medication registry job by started at in descending order"
STARTED_AT_DESC
}
"""
A connection to a list of `MedicationRegistryJob` values.
"""
type MedicationRegistryJobConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of nodes."
nodes: [MedicationRegistryJob]
"A list of edges."
edges: [MedicationRegistryJobEdge]
}
"""
Reads and enables pagination through a set of `MedicationRegistryJob`.
"""
type MedicationRegistryJobEdge {
"The item at the end of the edge."
node: MedicationRegistryJob!
"A cursor for use in pagination."
cursor: String!
}
"""
An object for MedicationRegistryJob.
"""
type MedicationRegistryJob implements Node {
"The ID of an object"
id: ID!
"Primary key identifier from the database"
databaseId: UUID!
"Job name."
name: String
"Medication registry Job status."
status: JobStatus!
"Job execution strategy."
strategy: JobStrategy!
"Date and time when the job starts."
startedAt: DateTime!
"Date and time when the job ends."
endedAt: DateTime
"Tasks within this job."
tasks(
"A condition to be used in determining which values should be returned by the collection."
filter: TaskFilter
"The method to use when ordering collection items."
orderBy: TaskOrderBy
"Read all values in the set after (below) this cursor."
after: String
"Read all values in the set before (above) this cursor."
before: String
"Only read the first _n_ values of the set."
first: Int
"Only read the last _n_ values of the set."
last: Int
): TaskConnection!
"Type of register originating medication registry data. The value should be present in the `REGISTER_TYPE` dictionary."
registerType: String!
"Medication registry job reason description."
reasonDescription: String!
}
Logic
Get list of all Medication registry Jobs filtered by:
medication registry job types (jabba.jobs.type):
create_medication_registry
update_medication_registry
deactivate_medication_registry
submitted search params
Render list with Medication registry Jobs data according to schema
Return number of total entries found in PageInfo block
Filters
Search with a few params performs according to the logical AND rule.
status. Search by jobs.status
Authorize
Verify the validity of access token
Verify that token is not expired
Check user scopes in order to perform this action (scope = 'medication_registry_job:read')
Request data validation
Validate legal entity
Extract client_id from token.
Check client scopes in order to perform this action (scope = 'medication_registry_job:read')
Check client type (type = NHS)
HTTP status codes