-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PRMDR - CIS2 Role handling added and configured (#120)
* Configured Login request to CIS2 to prompt for role selection. * Use selected_roleid from cis2 to determine user's role. * General role checks as part of the token handler to return a system role as part of the request. * Patient Active state added to Patient Search Handler as well as ODS Patient to User GP Practise ODS matching. * GP Clinical role added to the system * UI changes to remove role selection and use role response from token handler * UI changes to handler workflow route based on active/inactive patient status. --------- Co-authored-by: Richard Smith <richard.smith33@nhs.net> Co-authored-by: AlexHerbertNHS <alexandra.herbert1@nhs.net> Co-authored-by: Joe Fong <joe.fong1@nhs.net> Co-authored-by: Scott Alexander <scott.alexander@madetech.com> Co-authored-by: Rio Knightley <rio.knightley2@nhs.net> Co-authored-by: NogaNHS <127490765+NogaNHS@users.noreply.github.com> Co-authored-by: Richard Smith <43441481+thisusernameisnowtaken@users.noreply.github.com> Co-authored-by: Rio Knightley <128376976+RioKnightleyNHS@users.noreply.github.com>
- Loading branch information
1 parent
731c3e4
commit 8160a95
Showing
70 changed files
with
16,636 additions
and
12,068 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const testPatient = '9000000009'; | ||
const patient = { | ||
birthDate: '1970-01-01', | ||
familyName: 'Default Surname', | ||
givenName: ['Default Given Name'], | ||
nhsNumber: testPatient, | ||
postalCode: 'AA1 1AA', | ||
superseded: false, | ||
restricted: false, | ||
active: true, | ||
}; | ||
|
||
const smokeTest = Cypress.env('CYPRESS_RUN_AS_SMOKETEST') ?? false; | ||
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/'; | ||
|
||
describe('assert GP_ADMIM workflow path', () => { | ||
const baseUrl = 'http://localhost:3000'; | ||
|
||
context('session management', () => { | ||
it('sets session storage on login and checks starting url route', () => { | ||
if (!smokeTest) { | ||
cy.intercept('GET', '/SearchPatient*', { | ||
statusCode: 200, | ||
body: patient, | ||
}).as('search'); | ||
} | ||
|
||
cy.login('GP_ADMIN'); | ||
cy.url().should('eq', baseUrl + '/search/upload'); | ||
|
||
cy.get('#nhs-number-input').click(); | ||
cy.get('#nhs-number-input').type(testPatient); | ||
cy.get('#search-submit').click(); | ||
cy.wait('@search'); | ||
|
||
cy.url().should('include', 'upload'); | ||
cy.url().should('eq', baseUrl + '/search/upload/result'); | ||
|
||
cy.get('#verify-submit').click(); | ||
|
||
cy.url().should('include', 'lloyd-george-record'); | ||
cy.url().should('eq', baseUrl + '/search/patient/lloyd-george-record'); | ||
}); | ||
}); | ||
}); |
45 changes: 45 additions & 0 deletions
45
app/cypress/e2e/0-ndr-core-tests/auth_gp_clinical_path.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const testPatient = '9000000009'; | ||
const patient = { | ||
birthDate: '1970-01-01', | ||
familyName: 'Default Surname', | ||
givenName: ['Default Given Name'], | ||
nhsNumber: testPatient, | ||
postalCode: 'AA1 1AA', | ||
superseded: false, | ||
restricted: false, | ||
active: true, | ||
}; | ||
|
||
const smokeTest = Cypress.env('CYPRESS_RUN_AS_SMOKETEST') ?? false; | ||
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/'; | ||
|
||
describe('assert GP_CLINICAL workflow path', () => { | ||
const baseUrl = 'http://localhost:3000'; | ||
|
||
context('session management', () => { | ||
it('sets session storage on login and checks starting url route', () => { | ||
if (!smokeTest) { | ||
cy.intercept('GET', '/SearchPatient*', { | ||
statusCode: 200, | ||
body: patient, | ||
}).as('search'); | ||
} | ||
|
||
cy.login('GP_CLINICAL'); | ||
cy.url().should('eq', baseUrl + '/search/upload'); | ||
|
||
cy.get('#nhs-number-input').click(); | ||
cy.get('#nhs-number-input').type(testPatient); | ||
cy.get('#search-submit').click(); | ||
cy.wait('@search'); | ||
|
||
cy.url().should('include', 'upload'); | ||
cy.url().should('eq', baseUrl + '/search/upload/result'); | ||
|
||
cy.get('#verify-submit').click(); | ||
|
||
cy.url().should('include', 'lloyd-george-record'); | ||
cy.url().should('eq', baseUrl + '/search/patient/lloyd-george-record'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const testPatient = '9000000009'; | ||
const patient = { | ||
birthDate: '1970-01-01', | ||
familyName: 'Default Surname', | ||
givenName: ['Default Given Name'], | ||
nhsNumber: testPatient, | ||
postalCode: 'AA1 1AA', | ||
superseded: false, | ||
restricted: false, | ||
active: false, | ||
}; | ||
|
||
const smokeTest = Cypress.env('CYPRESS_RUN_AS_SMOKETEST') ?? false; | ||
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/'; | ||
|
||
describe('assert PCSE workflow path', () => { | ||
const baseUrl = 'http://localhost:3000'; | ||
|
||
context('session management', () => { | ||
it('sets session storage on login and checks starting url route', () => { | ||
if (!smokeTest) { | ||
cy.intercept('GET', '/SearchPatient*', { | ||
statusCode: 200, | ||
body: patient, | ||
}).as('search'); | ||
} | ||
|
||
cy.login('PCSE'); | ||
|
||
cy.url().should('eq', baseUrl + '/search/patient'); | ||
|
||
cy.get('#nhs-number-input').click(); | ||
cy.get('#nhs-number-input').type(testPatient); | ||
cy.get('#search-submit').click(); | ||
cy.wait('@search'); | ||
|
||
cy.get('#verify-submit').click(); | ||
cy.url().should('eq', baseUrl + '/search/results'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
app/cypress/fixtures/requests/auth/GET_TokenRequest_GP_ADMIN.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"role": "GP_ADMIN", | ||
"authorisation_token": "111xxx222" | ||
} |
4 changes: 4 additions & 0 deletions
4
app/cypress/fixtures/requests/auth/GET_TokenRequest_GP_CLINICAL.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"role": "GP_CLINICAL", | ||
"authorisation_token": "111xxx222" | ||
} |
4 changes: 4 additions & 0 deletions
4
app/cypress/fixtures/requests/auth/GET_TokenRequest_NONE.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"role": "NONE", | ||
"authorisation_token": "111xxx222" | ||
} |
4 changes: 4 additions & 0 deletions
4
app/cypress/fixtures/requests/auth/GET_TokenRequest_PCSE.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"role": "PCSE", | ||
"authorisation_token": "111xxx222" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.