-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
By patient #48
By patient #48
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success95 tests passing in 8 suites. Report generated by 🧪jest coverage report action from 28e5af2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo great functionality! Just some small comments :)
src/services/export.service.js
Outdated
|
||
const types = request.query._type?.split(',') || parameters._type?.split(','); | ||
const types = request.query._type?.split(',') || parameters._type?.split(','); //TODO, does gatherParams not pull from the query as well? Why is this OR required? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good call, looks like we can remove it and the one below but I would do some quick testing to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this and did some testing across POST/GET for _type and _elements
Typo and remove unnecessary parameter Co-authored-by: Elsa Perelli <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Summary
Support option for exporting files by patient (rather than by type)
New behavior
POST or GET requests sent to either the Patient or Group (but not System) $export endpoint may include a parameter
_bySubject
with valuePatient
which causes an export kickoff that will create files with resources grouped by patient. Each file is named based on the patient id, and the resulting stored bulk export status has a byPatient flag set to true. This may be used in combination with thepatient
parameter to create files for specified patients.Code changes
_bySubject
validation and pass it to the job and bulk export request.Testing guidance
npm run check
npm run start
_bySubject-Insomnia.json
Update: Also test kickoff import as described here: #47 . Test with deqm-test-server branch here: projecttacoma/deqm-test-server#156
Note: There are a couple of TODO questions left that aren't really to do with this task but are potentially small things we might want to spruce up in other parts of the code. Interested in opinions on whether we want to address those things as well either in this PR or maybe a future general code cleanup task.