-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 354-generic-resource-list
- Loading branch information
Showing
14 changed files
with
1,303 additions
and
45 deletions.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
resources/seeds/Client/a57d90e3-5f69-4b92-aa2e-2992180863c2.yaml
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,15 @@ | ||
auth: | ||
authorization_code: | ||
redirect_uri: https://portal-xrp.digitalhealth.gov.au/FormsPortal/authorisation | ||
refresh_token: true | ||
secret_required: false | ||
access_token_expiration: 36000 | ||
type: smart-on-fhir-practitioner | ||
smart: | ||
name: ADHA CHAP Form | ||
launch_uri: https://portal-xrp.digitalhealth.gov.au/FormsPortal/launch | ||
description: ADHA CHAP Form | ||
grant_types: | ||
- authorization_code | ||
id: a57d90e3-5f69-4b92-aa2e-2992180863c2 | ||
resourceType: Client |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
import { | ||
CONTROL_ITEM_LINK_ID, | ||
generateQAndQRData, | ||
QuestionnaireData, | ||
testEnableWhenCases, | ||
ENABLE_WHEN_TESTS_TITLE, | ||
} from './utils'; | ||
|
||
const ENABLE_WHEN_EQUAL_QUESTIONAIRES: QuestionnaireData[] = [ | ||
{ | ||
...generateQAndQRData({ | ||
type: 'integer', | ||
enableWhen: [ | ||
{ | ||
question: 'q1', | ||
operator: '=', | ||
answer: { integer: 1 }, | ||
}, | ||
], | ||
qrItem: [ | ||
{ | ||
linkId: 'q1', | ||
answer: [{ value: { integer: 1 } }], | ||
}, | ||
{ | ||
linkId: 'q2', | ||
answer: [], | ||
}, | ||
{ | ||
linkId: CONTROL_ITEM_LINK_ID, | ||
answer: [], | ||
}, | ||
], | ||
}), | ||
}, | ||
{ | ||
...generateQAndQRData({ | ||
type: 'integer', | ||
enableWhen: [ | ||
{ | ||
question: 'q1', | ||
operator: '=', | ||
answer: { string: 'test' }, | ||
}, | ||
], | ||
qrItem: [ | ||
{ | ||
linkId: 'q1', | ||
answer: [{ value: { string: 'test2' } }], | ||
}, | ||
{ | ||
linkId: 'q2', | ||
answer: [], | ||
}, | ||
], | ||
}), | ||
}, | ||
{ | ||
...generateQAndQRData({ | ||
type: 'integer', | ||
enableWhen: [ | ||
{ | ||
question: 'q1', | ||
operator: '=', | ||
answer: { string: 'test1' }, | ||
}, | ||
{ | ||
question: 'q2', | ||
operator: '=', | ||
answer: { string: 'test2' }, | ||
}, | ||
], | ||
qrItem: [ | ||
{ | ||
linkId: 'q1', | ||
answer: [{ value: { string: 'test1' } }], | ||
}, | ||
{ | ||
linkId: 'q2', | ||
answer: [{ value: { string: 'test2' } }], | ||
}, | ||
{ | ||
linkId: CONTROL_ITEM_LINK_ID, | ||
answer: [], | ||
}, | ||
], | ||
}), | ||
}, | ||
{ | ||
...generateQAndQRData({ | ||
type: 'integer', | ||
enableWhen: [ | ||
{ | ||
question: 'q1', | ||
operator: '=', | ||
answer: { string: 'test1' }, | ||
}, | ||
{ | ||
question: 'q2', | ||
operator: '=', | ||
answer: { string: 'test2' }, | ||
}, | ||
], | ||
qrItem: [ | ||
{ | ||
linkId: 'q1', | ||
answer: [{ value: { string: 'asd' } }], | ||
}, | ||
{ | ||
linkId: 'q2', | ||
answer: [{ value: { string: 'test2' } }], | ||
}, | ||
], | ||
}), | ||
}, | ||
{ | ||
...generateQAndQRData({ | ||
type: 'integer', | ||
enableBehavior: 'any', | ||
enableWhen: [ | ||
{ | ||
question: 'q1', | ||
operator: '=', | ||
answer: { Coding: { code: 'test1', display: 'test1' } }, | ||
}, | ||
{ | ||
question: 'q2', | ||
operator: '=', | ||
answer: { Coding: { code: 'test2', display: 'test2' } }, | ||
}, | ||
], | ||
qrItem: [ | ||
{ | ||
linkId: 'q1', | ||
answer: [{ value: { Coding: { code: 'asd', display: 'asd' } } }], | ||
}, | ||
{ | ||
linkId: 'q2', | ||
answer: [{ value: { Coding: { code: 'test2', display: 'Different display' } } }], | ||
}, | ||
{ | ||
linkId: CONTROL_ITEM_LINK_ID, | ||
answer: [], | ||
}, | ||
], | ||
}), | ||
}, | ||
]; | ||
|
||
describe('Enable when: "="', () => { | ||
test.each(ENABLE_WHEN_EQUAL_QUESTIONAIRES)(ENABLE_WHEN_TESTS_TITLE, testEnableWhenCases); | ||
}); |
Oops, something went wrong.