Draft
Conversation
…-manager into DDP-5103_testbostson_demographic_dashboard � Conflicts: � src/main/java/org/broadinstitute/dsm/route/BatchKitsRoute.java
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://broadinstitute.atlassian.net/browse/DDP-5819
Draft version of dynamic dashboard statistics feature:
Statisticinterface which helps to make high level abstraction for the feature, to make easier to add different kind of statistic representation later, this type interface will be parent of all type of statistic(Counter, Graph, etc).StatisticFactoryinterface andStatisticCreatorclass which will help to generate different kind of Statistic type, to hideswitchstatement which manages to which type of object return depending on statistic type(Counter-Participant, Graph-Participant etc).StatisticResultabstract class which will be parent class of result of any type of statistic, currently empty but it can be useful to provide common data for all kind of statisticStatisticPayloadfirst intention of this class was to deserialize json from frontend of what kind of statistic user wanted to create, but currently is used to create Java object filled with data fromdashboard_settingstable, I think it can be good helper class to communicate with code from outer world(Database, Frontend, etc).StatisticForidea of this enum class is to make difference for what we make statistics, statistics for participant related things or statistics for medical record related things and etc.FilterTypenearly the same idea asStatisticForhas, will help in filtering data, for exampleStatisticForcan bePARTICIPANTandFilterTypewill beENROLLED,REGISTERED, etc it should be useful for filtering to have small methods which will haveSingle Responsibility.DisplayTypeenum class, the same idea asFilterTypeandStatisticForhave, to make difference on code level what kind of representation is required.Counter,ParticipantCounterandCounterResultclasses are related to COUNTER representation of statistic, I think each representation will have such classes, for exampleBarGraph,ParticipantBarGraph,BarGraphResult, all of these classes will have typeStatistic