-
Notifications
You must be signed in to change notification settings - Fork 174
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
[New Feature] Tracking and Configuration of Candidate's Diagnosis Evolution #7560
Conversation
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.
this is really cool! setting it all up works well. i have a couple bugs, comments and a request.
some bugs:
- if I click on the trajectory tab I just created, then back to 'New Diagnosis Trajectory' tab, the form doesn't re-render as a new form, it still shows the trajectory I just created
- reset button doesn't work
request: is there a possibility to add a timestamp?
questions: is candidate_latest_diagnosis really just candidate_diagnosis_rel? i.e. do all the entries in the Diagnosis Evolution table on the front-end get stored in there?
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.
Hey @zaliqarosli I'll try to get to your feedbacks afterwards and see what is still relevant. As for the rendering of diagnosis for QPN, that's a tough one. I imagine they are dropdown options? That sort of information isn't captured by data dictionary / parameter type. I guess you could hard-code the mapping or use grep on the instrument linst file... But these are both pretty hacky solutions. Maybe @ridz1208 has a suggestion |
e68b0e0
to
35fea1d
Compare
@zaliqarosli @driusan your requested changes have been implemented |
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.
Refactored this PR to track the diagnosis evolution as a history rather than the current latest diagnosis. Also implemented @ridz1208 suggestion for showing the confirmation status of a diagnosis (whether the diagnosis comes from an approved visit or not). |
@jesscall what is the status of this? |
I'm not sure who's maintaining this PR now but the tests on it are failing and there's a few eslint warnings that need to be fixed (the error ones are the reason it's failing)
|
@driusan ya im working on it |
fb9b34e
to
b0b36b0
Compare
I am getting 2 errors and a blank page on the configuration -> Diagnosis Evolution page:
The first seems to be because something is written using an old/deprecated style from react. The second is because import statements from |
Actually it looks like the imports are already there on main. The branch needs to be rebased so that the candidate_parameters loads (and the new tab may need to be fixed.) |
author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561499 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561457 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561433 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561346 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561321 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561301 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699561256 -0500 parent ad0460c author jesscall <[email protected]> 1627406855 -0400 committer zaliqarosli <[email protected]> 1699560890 -0500 [Diagnosis Evolution] First commit [Diagnosis Evolution] Validation & progress start cand param cand param tab more progress, getLatestDx, multiple sourceFields switching to propagate data - not done propagate data done, caveat script done schema test plans more documentation Added LatestDX to CouchDB Demographics import bug fix on candidate get latest source phpcs fixing errors added project to config and cand param, need to revamp sql structure progress on the sql structure and reworking logic multi-project support implemented Amend CouchDB Demographics Import for multiproject support of latest Dx phpcs progress on reactification progress reactification & php endpoint cleanup addressing zal's comments align buttons timestamp reverted back to sourcefield from parameter type phan starting refactor revamped react, backend refactored to dx history and confrimed logic completely reworked, front end finished. Need to update documentation and DQT imports add configured order to cand param couchDB demographics import updated phpcs propagate logic fix utility fxn to update confrimation status some lil fixes changes requested & changing confirmed = passed visit changing db initialization phan Apply zal's suggestions from code review Co-authored-by: Zaliqa <[email protected]> Apply zal's suggestions to schema amend param comment Update php/libraries/Utility.class.inc Update php/libraries/NDB_BVL_Instrument.class.inc Update modules/configuration/php/diagnosis.class.inc Update modules/candidate_parameters/ajax/getData.php Update SQL/New_patches/2021-07-28_diagnosis_evolution.sql Update SQL/0000-00-00-schema.sql rm links to other pages Co-authored-by: Zaliqa <[email protected]> Apply suggestions from code review Co-authored-by: Zaliqa <[email protected]> Update modules/configuration/php/diagnosis.class.inc travis update diagnosis if at least 1 field has data Co-authored-by: Zaliqa <[email protected]> zal's comment about pselect dont duplicate same diagnosis if confirmed Update tools/data_integrity/update_candidate_latest_diagnosis.php Co-authored-by: Zaliqa <[email protected]> lintphp fix null checks add approval status check cleanup and fix reset restrict saving diagnosis evolution for cands projects check name conflict as case insensitive Update tools/CouchDB_Import_Demographics.php To avoid error with projects that have a space in their name Co-authored-by: CamilleBeau <[email protected]> Update tools/CouchDB_Import_Demographics.php To avoid error with projects that have a space in their name Co-authored-by: CamilleBeau <[email protected]> Update modules/configuration/php/diagnosis.class.inc This caused a bug on CCNA when trying to set diagnosis evolution if the visits haven't yet been started, so I did a select from test_battery instead of session Co-authored-by: CamilleBeau <[email protected]> Update modules/configuration/php/diagnosis.class.inc Co-authored-by: CamilleBeau <[email protected]> cleanup declare DB cleanup repeat declaration add Delete button [Diagnosis Evolution] First commit [Diagnosis Evolution] Validation & progress cand param tab more progress, getLatestDx, multiple sourceFields schema more documentation Added LatestDX to CouchDB Demographics import phpcs added project to config and cand param, need to revamp sql structure multi-project support implemented Amend CouchDB Demographics Import for multiproject support of latest Dx phpcs progress on reactification progress reactification & php endpoint cleanup addressing zal's comments align buttons timestamp reverted back to sourcefield from parameter type starting refactor logic completely reworked, front end finished. Need to update documentation and DQT imports propagate logic fix some lil fixes changes requested & changing confirmed = passed visit Apply zal's suggestions to schema amend param comment Update php/libraries/Utility.class.inc Update php/libraries/NDB_BVL_Instrument.class.inc Update SQL/New_patches/2021-07-28_diagnosis_evolution.sql Update SQL/0000-00-00-schema.sql rm links to other pages Co-authored-by: Zaliqa <[email protected]> Update modules/configuration/php/diagnosis.class.inc travis zal's comment about pselect dont duplicate same diagnosis if confirmed Update tools/data_integrity/update_candidate_latest_diagnosis.php Co-authored-by: Zaliqa <[email protected]> lintphp fix null checks add approval status check restrict saving diagnosis evolution for cands projects check name conflict as case insensitive Update tools/CouchDB_Import_Demographics.php To avoid error with projects that have a space in their name Co-authored-by: CamilleBeau <[email protected]> Update modules/configuration/php/diagnosis.class.inc Co-authored-by: CamilleBeau <[email protected]> declare DB cleanup repeat declaration phpcs Test suite changes fix action declaration whitespace Update modules/configuration/php/diagnosis.class.inc Update modules/configuration/test/TestPlan.md Co-authored-by: Zaliqa <[email protected]> Update modules/candidate_parameters/test/TestPlan.md Co-authored-by: Zaliqa <[email protected]> Fix Delete & testplan Cleanup, required elenents error, clearing form phpcs typo fix project checking in script phpcs Fix resetting of old diagnosis trajectories Add SubmitURL SubmitUrl proptype
delete debuggin comment
b0b36b0
to
e3b0cd2
Compare
@driusan fixed, and checks passed. could you have another look? |
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.
This is pretty cool, just some small comments.
I also find the "SearchableDropdown" on the configuration page confusing because it looks like a text field.
<p>This diagnosis is <strong style={{color: 'green'}}> | ||
confirmed</strong>. | ||
A confirmed diagnosis is one that belongs to a visit | ||
that has been sent to DCC for approval. |
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.
I don't understand this criteria. Why does sending to DCC for approval mean the diagnosis is confirmed?
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.
that's the workflow that was agreed on during a loris meeting, and what was implemented by CCNA. sending a timepoint to DCC makes the diagnosis for that configured visit confirmed, before that the diagnosis isn't confirmed
@driusan the SearchableDropdown being used is just the one that is in the jsx form elements file so its UI can be targeted in a separate if necessary. I added the FK for test name, ready for your review/testing again |
After We merge the diagnosis new feature into 26.0-release([New Feature] Tracking and Configuration of Candidate's Diagnosis Evolution (#7560)), it cause a bug. if diagnosis is empty. the whole candidate param page will be broken.
Brief summary of changes
This PR adds a way for project administrators to define and configure diagnosis trajectories for their project. The aim of this new feature is multifaceted; it allows study coordinators to
Interest for this feature was expressed by multiple projects during the DCC meeting on July 7th.
What is included in this PR?
1. A configuration page for diagnosis evolution
2. A tab in candidate parameters to view details on the evolution of the diagnosis.
3. Logic to propagate the latest diagnosis data as instruments are updated.
4. A script that all projects should run when configuring Dx Trajectories and updating their instances.
5. Updates the demographic import to couchDB so the latest diagnosis can be queried.
Info
A
Diagnosis Trajectory
is defined by a source field, or group of source fields, that are found within the test battery.A patient's
Diagnosis Evolution
is defined by the progression of changing diagnoses over time. The evolution is determined by the order of configuredDiagnosis Trajectories
.There are two ways that the
Latest Diagnosis
of the candidate can be updated. First, the script in this PR can be run. Secondly, when ANY instrument part of a configured diagnosis track is saved, the latest diagnosis is determined and updated in thecandidate
table.EX:
Testing instructions (if applicable)
fetch jesscall && git checkout jesscall/2021_07_27_diagnosis_evolution
cat SQL/New_patches/2021-07-28_diagnosis_evolution.sql | mysql
make dev
php tools/data_integrity/update_candidate_latest_diagnosis.php
candidate
table (if it's the latest) and the candidate parameters tab.Link(s) to related PR(s)