Skip to content
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

Unscheduled visits #47

Merged
merged 6 commits into from
Feb 1, 2018
Merged

Unscheduled visits #47

merged 6 commits into from
Feb 1, 2018

Conversation

samussiah
Copy link
Contributor

@samussiah samussiah commented Jan 18, 2018

Issues

Closes #43

@samussiah samussiah added this to the v2.2.0 milestone Jan 18, 2018
@samussiah samussiah added this to coding in v2.2.0 Jan 18, 2018
@samussiah samussiah removed this from the v2.2.0 milestone Jan 18, 2018
@samussiah samussiah moved this from coding to code review in v2.2.0 Jan 18, 2018
@jwildfire jwildfire changed the base branch from master to v2.2.0-dev January 18, 2018 23:59
@@ -94,16 +103,9 @@ export const controlInputs = [
},
{ type: 'number', label: 'Lower Limit', option: 'y.domain[0]', require: true },
{ type: 'number', label: 'Upper Limit', option: 'y.domain[1]', require: true },
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we confirmed with Jack that this is ok to remove? Seems like it would be easy enough to keep. Maybe just refactor using the same workflow as removeUnscheduledVisits.js below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further thought, I think the "hide visits with no data" control is worth keeping unless there is a compelling reason not to do so ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, on second thought it's nice to have.

@jwildfire
Copy link
Contributor

@samussiah #43 needs test notes. Do we need a new data set with simulated unscheduled visits?

@@ -20,6 +20,8 @@ const defaultSettings = {
boxplots: true,
violins: false,
missingValues: ['', 'NA', 'N/A'],
unscheduled_visits: false,
unscheduled_visit_pattern: /unscheduled|early termination/i,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably lean towards making this text based instead of requiring users to understand regex. Or I suppose we could support both by adding unscheduled_visit_terms:["unscheduled","early termination"] alongside the unscheduled_visit_pattern and then building some logic regarding which one takes precedence ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is unscheduled visits typically have a suffix that indicates where the visit fell in the schedule of events. I've added another parameter, unscheduled_visit_values that default to null but overrides the unscheduled_visit_pattern if specified.

@jwildfire jwildfire mentioned this pull request Jan 19, 2018
@jwildfire jwildfire moved this from code review to coding in v2.2.0 Jan 19, 2018
@samussiah
Copy link
Contributor Author

data/safetyData/ADBDS.csv has been updated with unscheduled visits and missing values. Ready for your review @jwildfire .

@emmorris emmorris moved this from coding to code review in v2.2.0 Jan 22, 2018
@jwildfire jwildfire added this to the v2.2.0 milestone Jan 23, 2018
d.unscheduled = this.config.unscheduled_visit_pattern.test(
d[this.config.time_settings.value_col]
);
d.unscheduled = this.config.unscheduled_visit_values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@@ -230,7 +230,9 @@
boxplots: true,
violins: false,
missingValues: ['', 'NA', 'N/A'],
visits_without_data: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd vote for unscheduled visits to be true by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind - I'd didn't notice the control. I think it's looking good as is.

@jwildfire
Copy link
Contributor

Passed Code Review. Passed to David for Feature Testing

@jwildfire jwildfire moved this from code review to feature testing in v2.2.0 Jan 23, 2018
@jwildfire jwildfire requested review from brittsikora and removed request for dschwentker January 30, 2018 17:32
@brittsikora
Copy link

The tests notes passed; great work Spencer!

@brittsikora brittsikora moved this from feature testing to done in v2.2.0 Feb 1, 2018
@samussiah samussiah merged commit c9f0d74 into v2.2.0-dev Feb 1, 2018
@samussiah samussiah deleted the unscheduled-visits branch February 1, 2018 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants