Skip to content

Commit 0cc1ddd

Browse files
committed
Added summary end point for lab job submissions.
1 parent c5c8d4c commit 0cc1ddd

File tree

1 file changed

+114
-1
lines changed

1 file changed

+114
-1
lines changed

assessment/cloud/spec.yml

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,77 @@ paths:
350350
content: {}
351351
x-codegen-request-body-name: body
352352

353+
/labs/results/{lab_id}/summary:
354+
get:
355+
operationId: getLabResultsSummary
356+
tags:
357+
- pas
358+
summary: Summary of analysis jobs associated with this lab.
359+
description: |
360+
Returns how many analysis jobs are associated with this lab.
361+
This includes analysis jobs updated to be associated with this lab.
362+
363+
Data is broken down by each status type.
364+
parameters:
365+
- name: lab_id
366+
in: path
367+
description: The lab identifier is one from the definitive list of labs (https://csse6400.uqcloud.net/resources/labs.csv).
368+
required: true
369+
schema:
370+
type: string
371+
example: "QML40671"
372+
- name: start
373+
in: query
374+
description: |
375+
Only return the number of analysis jobs submitted from this date.
376+
The date should be in RFC3339 format.
377+
378+
If the start date is not provided, the report should start from the earliest accepted analysis job.
379+
required: false
380+
schema:
381+
type: string
382+
format: date-time
383+
example: 2025-03-12T08:00:00Z
384+
- name: end
385+
in: query
386+
description: |
387+
Only return the number of analysis jobs submitted before this date.
388+
The date should be in RFC3339 format.
389+
390+
If the end date is not provided, the report should finish with the most recently accepted analysis job.
391+
required: false
392+
schema:
393+
type: string
394+
format: date-time
395+
example: 2025-03-15T18:00:00Z
396+
responses:
397+
200:
398+
description: Breakdown of the number of analysis jobs submitted.
399+
content:
400+
application/json:
401+
schema:
402+
$ref: '#/components/schemas/Summary'
403+
400:
404+
description: |
405+
Invalid query parameters.
406+
407+
Return value is not specified but should describe the error
408+
(e.g. "13 is not a valid month").
409+
content: {}
410+
404:
411+
description: |
412+
Lab identifier does not correspond to a known lab.
413+
414+
Return value is not specified but should not leak any internal system data structure information.
415+
content: {}
416+
500:
417+
description: |
418+
An unknown error occurred trying to process the request.
419+
420+
Return value is not specified but should describe the error.
421+
content: {}
422+
x-codegen-request-body-name: body
423+
353424
/patients/results:
354425
get:
355426
operationId: getPatientResults
@@ -533,7 +604,49 @@ components:
533604
type: string
534605
format: date-time
535606
description: The date and time the analysis job was last updated, including creation and completion of analysis.
536-
example: 2025-02-12T13:10:35Z
607+
608+
Summary:
609+
type: object
610+
properties:
611+
lab_id:
612+
type: string
613+
description: The lab identifier of the lab who's data is being summarised.
614+
example: "QML40671"
615+
pending:
616+
type: integer
617+
description: The number of analysis jobs that are currently still pending.
618+
minimum: 0
619+
example: 5
620+
covid:
621+
type: integer
622+
description: The number of COVID-19 cases that have been identified.
623+
minimum: 0
624+
example: 150
625+
h5n1:
626+
type: integer
627+
description: The number of H5N1 cases that have been identified.
628+
minimum: 0
629+
example: 65
630+
healthy:
631+
type: integer
632+
description: The number of tests that reported that the patient was healthy.
633+
minimum: 0
634+
example: 355
635+
failed:
636+
type: integer
637+
description: The number of analysis jobs that failed.
638+
minimum: 0
639+
example: 15
640+
urgent:
641+
type: integer
642+
description: The number of analysis jobs that were flagged as being urgent.
643+
minimum: 0
644+
example: 50
645+
generated_at:
646+
type: string
647+
format: date-time
648+
description: The date and time that this summary was created.
649+
example: 2025-03-20T17:10:00Z
537650

538651
Error:
539652
type: object

0 commit comments

Comments
 (0)