-
Notifications
You must be signed in to change notification settings - Fork 139
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
Enhanced Cohort Sampling and Patient Profiles #2357
base: master
Are you sure you want to change the base?
Conversation
Hi, I'm looking at this now, but could you look into resolving the conflict? |
Hi, Update: as I checked out your branch, I had to resolve convlicts locally for me, the conflict seems simple: just put the async refreshPrintFrindly() function before your new functions related to sample (starting with clickSampleTab())..and that seems to resolve it for me. I'm not able to merge anything back into your fork but just letting you know what I did to resolve. |
Ok, i did run into an issue related to BIGINT being sent down to Javascript. Numbers that are very large for PERSON_ID are being corrupted, for example:
So, when the Javascript gets the number from the server, it's corrupted and then the person_id can't be found when it navigates to the profile. I think if these are sent to the client as a string, you may be able to avoid this. We don't do any arithmetic operations on these IDs so it should be safe to just use the value as string. |
Thanks @chrisknoll. Will take a look at the new merge conflict and the bigint issue. |
Thanks @MaximMoinat . One more for the pile: When you pull up a sample result, the bottom table populates with the results. If you then click 'delete' on the top table, the bottom table remains. It would probably make sense to 'deselect' the sample in the bottom table if it gets deleted. |
Hi, found the following:
I found some issues on the WebAPI side, but I'll cover those over in the other PR. |
@chrisknoll Thanks for testing. I fixed the first two points in our branch as well. I did not fix the third point as I am not really comfortable with registering components and it works now. |
No problem. Thanks for the update, I'll check it now. |
Update on the first one. This is comming from line 47 of profileTimeline.js:
The |
Ok, more information on this: I think part of the problem is just dealing with the component lifecycle: when the page is loaded, there's no person yet, but we want to instantiate the ProfileTimeline component. This instantiation happens once, and in the constructor of the class, it attempts to find an element which is hidden by the Quick fix could be just to hard code the width (for now) until we work out a way to do it dynamically. There are other examples in the codebase where we render SVG (via d3) elements as charts, but they rely on databinding and other things that do not depend on 'getElementById' (something we should avoid anyway because you can't guarntee uniqueness of an element ID). But I don't want to get into a serious redesign effort here...let's see what minor changes we can make to get it to work. |
I stepped through this more, and I think the reason why i saw it working is that when you resize the browser window, a redraw() call is made which then can find the geometry of the containing div, gets an actual width value, and everything renders. I'm pretty sure with a little rework, we can get this working properly, but it's a bit hard to do so across forked branches. So, I was going to suggest taking this PR into a Atlas-repo branch where I can make modifications, if that would be acceptable to the original authors of this PR. |
We would be happy to have this PR taking into this Atlas-repo, if that simplifies the process. If you encounter more issues and additional testing is necessary on our side, please let us know. |
Slight change of plans on my side: I managed to fork the repo from I'm leaning towards doing it this way because I'd like to have a better collaboration with you guys about the proposed changes, see if you agree with it and not be surprised by anything. It didn't feel right to just absorb the branch and work on it alone...so, expect to see a PR to your fork's branch in the next couple of days. |
Hello, @MaximMoinat and The Hyve! Another day, another update: I spent the morning reviewing the new functionality with Patrick and there is a lot of excitement and motivation to get these changes incorporated into the application. There is also an effort from the folks at Georgia Tech to incorporate a annotation feature to patient profiles that is ongoing and there's a great opportunity to collaborate together and introduced a full revamped and enhanced patient profile experience. During the functional review, we found a number of issues/concerns that were introduced with the profile viewer update, as well as some concerns on the back end side, which I'll discuss in this comment (and not spread out feedback across 2 threads). Based on the discussion and discovery, we think that it would be possible to push a change for 2.8 that has a much more narrow focus: selecting the cohort sample from a cohort generation. Considering the other changes involved with the new Profile Viewer UI, we just don't think we can test/certify all the functionality in time for the 2.8 release. But, the cohort sample function is relatively simple, and provides a path to the profile viewer (as a URL redirect) and I believe we can pull in the cohort sample functionality independently from the profile viewer. At this level, I can commit to getting that functionality into a 2.8 release. Here's the (incomplete) list of items that we identify that we'd want addressed (except some of the enhancement items, but other enhancements may be required): Bug = bad/error behavior enh = enhacement tst = need to test Cohort Sample:
Patient Profile Viewer
Trying to cover all of these in the next 2 weeks to meet the 2.8 release is not possible, but I do think it is possible to incorporate the cohort sampling back-end function, add the new 'sample' tab to cohort definitions, and allow navigation to a patient_id from the sample results view. We still need to test this on multiple platforms (especially Impala and redshift) to ensure that it functions but we can get help from the community, and also ensure that security is configured properly. I would like to know if you have any objections to this narrower focus. My plan would be to use the existing WebAPI pr to support the cohort sample endpoints (but we need to revise some column names of the results schema tables since I think 'rank' may be used as a reserved word on some platforms). On the Atlas side, it's a bit more complicated: I'd create a new branch in OHDSI/Atlas and I'd manually do a diff of the Hyve's atlas PR and the current Atlas master and only pull in those changes that adds the new javascript REST service calls and the new cohort definition manager tab. I'd update those tab changes to call the existing atlas URLs to load the current profile viewer. This will have a very important impact of allow the patient profile viewer to be 'accessable' without the tornado report. This is a huge win, and I think would be fairly straightforward to implement. Thank you all for your hard work on this, and please let me know if you have any concerns. I will make sure that the proper credits are indicated in the separate commits (if you could please provide names and email addresses of people you would like me to put into the commit messages, otherwise I will credit 'The Hyve' for these contributions. |
Again, thanks Chris (and Patrick) for this extensive review. Much appreciated that you are putting so much time and effort into making the best possible integration of these new features. Although we would really like to see both features merged for v2.8, I see no reason to split it. I will double-check with our team whether there are any objections to splitting the functionalities. One small remark; the current sample tab offers a 'multi-person' comparison in the timelines. This has to be removed if we keep using the current profile viewer. (and this is also one of the reasons we have one branch for both features, ideally it would have been two to start with) |
@MaximMoinat , |
Since this PR is being partially covered in #2373, I'm making this PR as a draft for now. It may be necessary to restart this PR based on the new codebase, but I leave it to you to decide how to move forward with it. |
Two new features:
These two features are combined in one PR, because they are interdependent. From the sample tab there is link to show the profile of the selected patient(s).
Both features are explained in more detail in this forum post.
Related to OHDSI/WebAPI#1657