Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #348 from ImisDevelopers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
wobkenh authored May 18, 2020
2 parents 203445f + 6028a48 commit 1c24e86
Show file tree
Hide file tree
Showing 49 changed files with 1,583 additions and 1,971 deletions.
1,434 changes: 0 additions & 1,434 deletions client/.editorconfig

This file was deleted.

22 changes: 4 additions & 18 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,19 @@ module.exports = {
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:vue/essential',
'@vue/standard',
'eslint:recommended',
'@vue/typescript/recommended',
'@vue/prettier',
'@vue/prettier/@typescript-eslint',
],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
},
rules: {
// '@typescript-eslint/rule-name': 'error',
'@typescript-eslint/no-extra-semi': 'error',

'no-console': 'off', // process.env.NODE_ENV === 'production' ? 'error' :
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
},
],
'space-before-function-paren': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'@typescript-eslint/no-explicit-any': 'off',
},
overrides: [
{
Expand Down
1 change: 1 addition & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SwaggerApi.ts
5 changes: 5 additions & 0 deletions client/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trailingComma: "es5"
useTabs: false
tabWidth: 2
semi: false
singleQuote: true
4 changes: 1 addition & 3 deletions client/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
presets: ['@vue/cli-plugin-babel/preset'],
}
6 changes: 5 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@
"@vue/cli-plugin-unit-mocha": "~4.2.0",
"@vue/cli-plugin-vuex": "~4.2.0",
"@vue/cli-service": "~4.2.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-standard": "^5.1.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/test-utils": "1.0.0-beta.31",
"chai": "^4.1.2",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"node-sass": "^4.12.0",
"prettier": "^2.0.5",
"sass-loader": "^8.0.2",
"swagger-typescript-api": "^1.7.2",
"typescript": "~3.7.5",
Expand Down
219 changes: 213 additions & 6 deletions client/src/api/SwaggerApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

export type AggregationResultZip = object;

export interface ApiFunctionSpec {
method?: string;
path?: string;
}

export interface AuthRequestDTO {
password?: string;
username?: string;
Expand Down Expand Up @@ -44,6 +49,7 @@ export interface CreateInstitutionDTO {

export interface CreateLabTestDTO {
comment?: string;
eventDate?: string;
laboratoryId?: string;
patientId?: string;
testId?: string;
Expand Down Expand Up @@ -85,7 +91,10 @@ export interface CreatePatientDTO {
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_MANDATED";
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
phoneNumber?: string;
preIllnesses?: string[];
quarantineUntil?: string;
Expand Down Expand Up @@ -155,6 +164,32 @@ export interface GrantedAuthority {
authority?: string;
}

export interface Incident {
caseId?: string;
eventDate?: string;
eventType?:
| "REGISTERED"
| "SUSPECTED"
| "ORDER_TEST"
| "SCHEDULED_FOR_TESTING"
| "TEST_SUBMITTED_IN_PROGRESS"
| "TEST_FINISHED_POSITIVE"
| "TEST_FINISHED_NEGATIVE"
| "TEST_FINISHED_INVALID"
| "TEST_FINISHED_RECOVERED"
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
id?: string;
patient?: Patient;
versionTimestamp?: string;
versionUser?: User;
}

export interface Institution {
city?: string;
comment?: string;
Expand Down Expand Up @@ -349,7 +384,10 @@ export interface Patient {
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_MANDATED";
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
phoneNumber?: string;
preIllnesses?: string[];
quarantineUntil?: string;
Expand Down Expand Up @@ -392,7 +430,10 @@ export interface PatientEvent {
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_MANDATED";
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
id?: string;
illness?: "CORONA";
labTest?: LabTest;
Expand Down Expand Up @@ -430,8 +471,29 @@ export interface PatientSearchParamsDTO {
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_MANDATED";
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
phoneNumber?: string;
quarantineStatus?: Array<
| "REGISTERED"
| "SUSPECTED"
| "ORDER_TEST"
| "SCHEDULED_FOR_TESTING"
| "TEST_SUBMITTED_IN_PROGRESS"
| "TEST_FINISHED_POSITIVE"
| "TEST_FINISHED_NEGATIVE"
| "TEST_FINISHED_INVALID"
| "TEST_FINISHED_RECOVERED"
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED"
>;
street?: string;
zip?: string;
}
Expand All @@ -444,6 +506,34 @@ export interface PatientSimpleSearchParamsDTO {
query?: string;
}

export interface QuarantineIncident {
caseId?: string;
comment?: string;
eventDate?: string;
eventType?:
| "REGISTERED"
| "SUSPECTED"
| "ORDER_TEST"
| "SCHEDULED_FOR_TESTING"
| "TEST_SUBMITTED_IN_PROGRESS"
| "TEST_FINISHED_POSITIVE"
| "TEST_FINISHED_NEGATIVE"
| "TEST_FINISHED_INVALID"
| "TEST_FINISHED_RECOVERED"
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
id?: string;
patient?: Patient;
until?: string;
versionTimestamp?: string;
versionUser?: User;
}

export interface RegisterUserRequest {
firstName?: string;
lastName?: string;
Expand All @@ -458,9 +548,32 @@ export interface RequestLabTestDTO {
patientId?: string;
}

export interface SendToQuarantineDTO {
export interface RequestQuarantineDTO {
comment?: string;
dateUntil?: string;
eventDate?: string;
status?:
| "REGISTERED"
| "SUSPECTED"
| "ORDER_TEST"
| "SCHEDULED_FOR_TESTING"
| "TEST_SUBMITTED_IN_PROGRESS"
| "TEST_FINISHED_POSITIVE"
| "TEST_FINISHED_NEGATIVE"
| "TEST_FINISHED_INVALID"
| "TEST_FINISHED_RECOVERED"
| "TEST_FINISHED_NOT_RECOVERED"
| "PATIENT_DEAD"
| "DOCTORS_VISIT"
| "QUARANTINE_SELECTED"
| "QUARANTINE_MANDATED"
| "QUARANTINE_RELEASED"
| "QUARANTINE_PROFESSIONBAN_RELEASED";
}

export interface SendToQuarantineDTO {
eventDate?: string;
patientIds?: string[];
}

export interface Timestamp {
Expand All @@ -482,6 +595,7 @@ export interface TokenDTO {

export interface UpdateTestStatusDTO {
comment?: string;
eventDate?: string;
file?: string;
status?: "TEST_SUBMITTED" | "TEST_IN_PROGRESS" | "TEST_POSITIVE" | "TEST_NEGATIVE" | "TEST_INVALID";
testId?: string;
Expand Down Expand Up @@ -803,6 +917,79 @@ export class Api<SecurityDataType = any> extends HttpClient<SecurityDataType> {
removeExposureContactUsingDelete: (id: number, params?: RequestParams) =>
this.request<any, any>(`/api/exposure-contacts/${id}`, "DELETE", params, null, true),

/**
* @tags incident-controller
* @name getPatientCurrentUsingGET
* @summary getPatientCurrent
* @request GET:/api/incidents/patient/{id}
* @secure
*/
getPatientCurrentUsingGet: (id: string, params?: RequestParams) =>
this.request<Incident[], any>(`/api/incidents/patient/${id}`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getPatientLogUsingGET
* @summary getPatientLog
* @request GET:/api/incidents/patient/{id}/log
* @secure
*/
getPatientLogUsingGet: (id: string, params?: RequestParams) =>
this.request<Incident[], any>(`/api/incidents/patient/${id}/log`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getSelectedForQuarantineUsingGET
* @summary getSelectedForQuarantine
* @request GET:/api/incidents/selected-for-quarantine
* @secure
*/
getSelectedForQuarantineUsingGet: (params?: RequestParams) =>
this.request<QuarantineIncident[], any>(`/api/incidents/selected-for-quarantine`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getIncidentUsingGET
* @summary getIncident
* @request GET:/api/incidents/{id}
* @secure
*/
getIncidentUsingGet: (id: string, params?: RequestParams) =>
this.request<Incident, any>(`/api/incidents/${id}`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getLogUsingGET
* @summary getLog
* @request GET:/api/incidents/{id}/log
* @secure
*/
getLogUsingGet: (id: string, params?: RequestParams) =>
this.request<Incident[], any>(`/api/incidents/${id}/log`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getPatientCurrentByTypeUsingGET
* @summary getPatientCurrentByType
* @request GET:/api/incidents/{type}/patient/{id}
* @secure
*/
getPatientCurrentByTypeUsingGet: (
id: string,
type: "test" | "quarantine" | "administrative",
params?: RequestParams,
) => this.request<Incident[], any>(`/api/incidents/${type}/patient/${id}`, "GET", params, null, true),

/**
* @tags incident-controller
* @name getPatientLogByTypeUsingGET
* @summary getPatientLogByType
* @request GET:/api/incidents/{type}/patient/{id}/log
* @secure
*/
getPatientLogByTypeUsingGet: (id: string, type: "test" | "quarantine" | "administrative", params?: RequestParams) =>
this.request<Incident[], any>(`/api/incidents/${type}/patient/${id}/log`, "GET", params, null, true),

/**
* @tags institution-controller
* @name createInstitutionUsingPOST
Expand Down Expand Up @@ -949,10 +1136,20 @@ export class Api<SecurityDataType = any> extends HttpClient<SecurityDataType> {
* @tags patient-controller
* @name sendToQuarantineUsingPOST
* @summary sendToQuarantine
* @request POST:/api/patients/quarantine
* @secure
*/
sendToQuarantineUsingPost: (dto: SendToQuarantineDTO, params?: RequestParams) =>
this.request<any, any>(`/api/patients/quarantine`, "POST", params, dto, true),

/**
* @tags patient-controller
* @name requestQuarantineUsingPOST
* @summary requestQuarantine
* @request POST:/api/patients/quarantine/{id}
* @secure
*/
sendToQuarantineUsingPost: (id: string, statusDTO: SendToQuarantineDTO, params?: RequestParams) =>
requestQuarantineUsingPost: (id: string, statusDTO: RequestQuarantineDTO, params?: RequestParams) =>
this.request<Patient, any>(`/api/patients/quarantine/${id}`, "POST", params, statusDTO, true),

/**
Expand Down Expand Up @@ -1011,6 +1208,16 @@ export class Api<SecurityDataType = any> extends HttpClient<SecurityDataType> {
getPatientForIdUsingGet: (id: string, params?: RequestParams) =>
this.request<Patient, any>(`/api/patients/${id}`, "GET", params, null, true),

/**
* @tags permission-query-controller
* @name queryPermissionsUsingPOST
* @summary queryPermissions
* @request POST:/api/permissions
* @secure
*/
queryPermissionsUsingPost: (items: Record<string, ApiFunctionSpec>, params?: RequestParams) =>
this.request<Record<string, boolean>, any>(`/api/permissions`, "POST", params, items, true),

/**
* @tags stats-controller
* @name getForZipUsingGET
Expand Down
Loading

0 comments on commit 1c24e86

Please sign in to comment.