Skip to content

Commit

Permalink
#2954 curator api disease agnostic (#2)
Browse files Browse the repository at this point in the history
* Case form working with Day 0 schema

* day 0 case schema implemented

* updated Cypress test

* added dynamic prefetched pathogen in case form

* fixed bugs and tests

* disabled all tests file in Cypress

* fixed linting errors

* day0 case schema implemented (before further breaking changes)

* refactored day 0 case schema

* new case form in curtor ui refactored

* bulk case uploads refactored

* Cypress tests fixed

* unit tests passing

* updated Cypress record key

* updated Cypress test

* fixed linting errors

* updated Cypress test

* fixed unit test

* updated unit test

* Cypress test fix

* Added location seeding to failing tests

* fixed bulk case form tests

* fixed Cypress tests

* fixed typo

* updated API tests

* updated API test

* fixed data service tests

* updated Cypress test

* Updated Cypress test

* enabled cypress tests recording

* disabled Cypress tests recording

* changes after code review
  • Loading branch information
maciej-zarzeczny authored Mar 14, 2023
1 parent 144430b commit aecc438
Show file tree
Hide file tree
Showing 149 changed files with 6,382 additions and 32,532 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
with:
working-directory: verification/curator-service/ui
browser: ${{ matrix.browser }}
record: true
record: false
wait-on: "http://localhost:3002"
wait-on-timeout: 300
install-command: sh ./install_in_ci.sh
env:
CI: true
CYPRESS_RECORD_KEY: 1ce3e9e4-e9e0-4e00-834f-7410b0d922d2
CYPRESS_RECORD_KEY: 1447b996-f025-495f-82d8-ca0b421ffd02
# Screenshots are only available on failures.
- uses: actions/upload-artifact@v3
if: failure()
Expand Down
277 changes: 112 additions & 165 deletions data-serving/data-service/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,15 @@ components:
Case:
description: A single line-list case.
properties:
caseStatus:
description: >
Status of the case
type: string
enum:
- confirmed
- suspected
- discarded
- omit_error
caseReference:
type: object
properties:
Expand All @@ -657,16 +666,6 @@ components:
items:
type: string
pattern: '^[a-f\d]{24}$'
verificationStatus:
description: >
Whether the case document has been manually verified for
correctness. For new cases, if this field isn't provided, a
default value of UNVERIFIED will be used.
type: string
enum:
- UNVERIFIED
- VERIFIED
- EXCLUDED
additionalSources:
type: array
items:
Expand All @@ -679,170 +678,134 @@ components:
properties:
gender:
type: string
enum:
[
null,
Male,
Female,
Non-binary/Third gender,
Other,
]
enum: [null, male, female, other]
ageRange:
type: object
properties:
start:
type: number
end:
type: number
ethnicity:
type: string
nationalities:
type: array
items:
type: string
occupation:
type: string
healthcareWorker:
type: string
enum: ['Y', 'N', 'NA']
location:
$ref: '#/components/schemas/Location'
events:
description: >
An event with name "confirmed" must be specified. Other event names
include onsetSymptoms, firstClinicalConsultation, selfIsolation,
hospitalAdmission, icuAdmission, and outcome.
type: array
items:
type: object
properties:
name:
type: string
dateRange:
$ref: '#/components/schemas/DateRange'
value:
type: string
symptoms:
Events connected with the case
type: object
properties:
status:
dateEntry:
$ref: '#/components/schemas/Date'
dateOnset:
$ref: '#/components/schemas/Date'
dateConfirmation:
$ref: '#/components/schemas/Date'
confirmationMethod:
type: string
enum:
[
null,
Asymptomatic,
Symptomatic,
Presymptomatic,
]
values:
type: array
items:
type: string
dateOfFirstConsult:
$ref: '#/components/schemas/Date'
hospitalized:
type: string
enum: ['Y', 'N', 'NA']
reasonForHospitalization:
type: string
enum: [monitoring, treatment, unknown]
dateHospitalization:
$ref: '#/components/schemas/Date'
dateDischargeHospital:
$ref: '#/components/schemas/Date'
intensiveCare:
type: string
enum: ['Y', 'N', 'NA']
dateAdmissionICU:
$ref: '#/components/schemas/Date'
dateDischargeICU:
$ref: '#/components/schemas/Date'
homeMonitoring:
type: string
enum: ['Y', 'N', 'NA']
isolated:
type: string
enum: ['Y', 'N', 'NA']
dateIsolation:
$ref: '#/components/schemas/Date'
outcome:
type: string
enum: [recovered, death]
dateDeath:
$ref: '#/components/schemas/Date'
dateRecovered:
$ref: '#/components/schemas/Date'
symptoms:
type: string
preexistingConditions:
type: object
properties:
hasPreexistingConditions:
type: boolean
values:
type: array
items:
type: string
previousInfection:
type: string
enum: ['Y', 'N', 'NA']
coInfection:
type: string
preexistingCondition:
type: string
pregnancyStatus:
type: string
enum: ['Y', 'N', 'NA']
transmission:
type: object
properties:
routes:
type: array
items:
type: string
places:
type: array
items:
type: string
linkedCaseIds:
type: array
items:
type: string
contactWithCase:
type: string
enum: ['Y', 'N', 'NA']
contactId:
type: string
contactSetting:
type: string
contactAnimal:
type: string
contactComment:
type: string
transmission:
type: string
travelHistory:
type: object
properties:
traveledPrior30Days:
type: boolean
travel:
type: array
items:
type: object
properties:
dateRange:
$ref: '#/components/schemas/DateRange'
location:
$ref: '#/components/schemas/FuzzyLocation'
purpose:
type: string
enum:
[
null,
Business,
Leisure,
Family,
Other,
]
methods:
type: array
items:
type: string
variant:
travelHistory:
type: string
enum: ['Y', 'N', 'NA']
travelHistoryEntry:
$ref: '#/components/schemas/Date'
travelHistoryStart:
type: string
travelHistoryLocation:
type: string
travelHistoryCountry:
type: string
genomeSequences:
type: object
properties:
name:
genomicsMetadata:
type: string
vaccines:
$ref: '#/components/schemas/VaccineArray'
genomeSequences:
type: array
items:
type: object
properties:
sampleCollectionDate:
$ref: '#/components/schemas/Date'
repositoryUrl:
type: string
sequenceId:
type: string
sequenceName:
type: string
sequenceLength:
type: integer
format: int64
minimum: 0
pathogens:
type: array
items:
type: object
properties:
name:
type: string
id:
type: integer
format: int32
minimum: 0
revisionMetadata:
accessionNumber:
type: string
vaccination:
type: object
properties:
revisionNumber:
type: integer
format: int32
minimum: 0
creationMetadata:
$ref: '#/components/schemas/EditMetadata'
editMetadata:
$ref: '#/components/schemas/EditMetadata'
required:
- revisionNumber
SGTF:
vaccination:
type: string
enum: ['Y', 'N', 'NA']
vaccineName:
type: string
vaccineDate:
$ref: '#/components/schemas/Date'
vaccineSideEffects:
type: string
pathogen:
type: string
enum:
[
'NA',
'0',
'1',
]
CaseArray:
type: object
properties:
Expand Down Expand Up @@ -911,38 +874,22 @@ components:
properties:
query:
type: string
country:
countryISO2:
type: string
minLength: 2
maxLength: 2
description: ISO-3166-2 code for a country.
example: GB
administrativeAreaLevel1:
type: string
administrativeAreaLevel2:
type: string
administrativeAreaLevel3:
country:
type: string
place:
description: name of a country
city:
type: string
name:
location:
type: string
description: exact location
geoResolution:
type: string
geometry:
type: object
properties:
latitude:
type: number
minimum: -90
maximum: 90
longitude:
type: number
minimum: -180
maximum: 180
required:
- latitude
- longitude
FuzzyLocation:
description: A geo location that can be unspecific. It may not be geocoded if it lacks information.
type: object
Expand Down
Loading

0 comments on commit aecc438

Please sign in to comment.