-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: Start using group filtering to define measurements table layout #4501
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Viewers Run #4599
Run Properties:
|
Project |
Viewers
|
Branch Review |
feat/measurements-service-filtering
|
Run status |
Passed #4599
|
Run duration | 02m 15s |
Commit |
6744e23d82: Merge remote-tracking branch 'origin/master' into feat/measurements-service-filt...
|
Committer | Bill Wallace |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
2
|
Skipped |
0
|
Passing |
44
|
View all changes introduced in this branch ↗︎ |
extensions/measurement-tracking/src/panels/PanelMeasurementTableTracking.tsx
Show resolved
Hide resolved
<MeasurementTable.Body /> | ||
</MeasurementTable> | ||
)} | ||
{untrackedFindings.length > 0 && ( |
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 think this might upset some people because we're imposing an untracked view on them. I was hoping people could choose what to see based on the filters they set through the customization service. Here, we simply loop over those filters and create the view, regardless of the number.
<MeasurementTable.Header>
</MeasurementTable.Header>
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.
Actually, that is what I wanted to have, I just wasn't quite there yet. Let me develop this a bit mroe and will pass it by you.
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.
@@ -169,7 +169,7 @@ export class CommandsManager { | |||
* the commandOptions specified in the base. | |||
*/ | |||
public run( | |||
toRun: Command | Commands | Command[] | string | undefined, | |||
toRun: Command | Commands | (Command | string)[] | string | undefined, |
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.
could we please update the docsring above and give example of what we can handle
something like
run ('updateMeasurement')
run (['updateMeasurement', 'displayWhatever'])
// other scnearios
@@ -81,7 +81,7 @@ const getPanelModule = ({ commandsManager, servicesManager, extensionManager }: | |||
name: 'panelMeasurement', | |||
iconName: 'tab-linear', | |||
iconLabel: 'Measure', | |||
label: 'Measurement', | |||
label: 'All Measurements', |
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 think changing this might disrupt other people's tests if they're selecting based on the label. Can we leave this one unchanged?
public getMeasurements(filter?: MeasurementFilter) { | ||
if (filter) { | ||
return [...this.measurements.values()].filter(measurement => filter.call(this, measurement)); | ||
} | ||
return [...this.measurements.values()]; | ||
} |
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.
how about this
public getMeasurements(filter?: MeasurementFilter) {
return [...this.measurements.values()].filter(measurement => filter?.call(this, measurement) ?? true);
}
@@ -582,11 +588,15 @@ class MeasurementService extends PubSubService { | |||
}); | |||
} | |||
|
|||
clearMeasurements() { | |||
public clearMeasurements(filter?: MeasurementFilter) { |
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.
doc please, what is filter, and how it can be used
* the study and series. | ||
*/ | ||
export function filterTracked(trackedStudy: string, trackedSeries) { | ||
return measurement => { |
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.
does it matter tracked? can't it be filterByStudyAndSeries
and still does the job?
* Filters for additional findings, that is, measurements with | ||
* a value of type point, and having a referenced image | ||
*/ | ||
export function filterAdditionalFinding(measurementService) { |
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.
filterAdditionalFindings? (s)
|
||
const { formatDate } = utils; | ||
|
||
export function StudySummaryFromMetadata({ studyInstanceUID }) { |
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.
Can we use dcmjs style namings? so StudyInstanceUID
for the prop? below you are actually doing const { StudyDate, StudyDescription } = instanceMeta;
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.
see my comments thanks
Context
The measurements service already has a few groups of measurement types, it would be nice to have more groups of types and allow them to be listed in various ways in the measurements panel.
This PR is a start of how the grouping might work, which includes some changes in the core grouping code. However, it doesn't include any enhanced features yet.
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment