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

fix(date formatting): Show study date as a fallback for an empty series date and show 'No Study Date' as a back up for both #3483

Conversation

jbocce
Copy link
Collaborator

@jbocce jbocce commented Jun 21, 2023

Context

See #3458

Changes & Results

Show 'No Study Date' in the study browser side panel when no study date is present in the DICOM.

Likewise, in the viewport action bar, when no series date is present, show the study date and if neither are present, show 'No Study Date'.

Testing

See #3458 for steps to reproduce the original problem.

As a regression test, ensure those studies with study and series dates defined work as expected.

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • OS: Windows 11
  • Node version: 16.14.0
  • Browser: Chrome 114.0.5735.134

…panel when no study date is present in the DICOM.

Likewise, in the viewport action bar, when no series date is present, show the study date and if neither
are present, show 'No Study Date'.
@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for ohif-platform-docs ready!

Name Link
🔨 Latest commit 818a47a
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/649af38e7758da0008d836a2
😎 Deploy Preview https://deploy-preview-3483--ohif-platform-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 818a47a
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/649af38e480e2b00086fa2c1
😎 Deploy Preview https://deploy-preview-3483--ohif-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -134,7 +134,7 @@ function PanelStudyBrowserTracking({
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
return {
studyInstanceUid: qidoStudy.StudyInstanceUID,
date: formatDate(qidoStudy.StudyDate),
date: formatDate(qidoStudy.StudyDate) || 'No Study Date',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is what was suggested in the reporting issue. However we can discuss alternatives.

Copy link
Member

Choose a reason for hiding this comment

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

How about N/A?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

N/A could apply to anything... not just a date. If someone sees N/A, they do not know what it is referring to. So no, I do not think N/A is appropriate. How about just 'No Date'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also N/A stands for not applicable. So I really don't think that is right.

Copy link
Member

Choose a reason for hiding this comment

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

@wayfarer3130 What should be here if it is empty?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably it should be an empty string if it is missing, then the UI can decide on the value to show when empty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@wayfarer3130, this is the UI. For me, the question is what to show in the UI.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about 'No Study Data' or 'No Date'

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm asking Dan about what to show.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed with No Study Date

@jbocce jbocce requested a review from sedghi June 21, 2023 15:54
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #3483 (818a47a) into master (52f419d) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3483   +/-   ##
=======================================
  Coverage   38.27%   38.27%           
=======================================
  Files          82       82           
  Lines        1348     1348           
  Branches      303      304    +1     
=======================================
  Hits          516      516           
+ Misses        666      665    -1     
- Partials      166      167    +1     
Impacted Files Coverage Δ
platform/core/src/utils/formatDate.js 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c98211c...818a47a. Read the comment docs.

@sedghi sedghi mentioned this pull request Jun 23, 2023
2 tasks
@wayfarer3130
Copy link
Contributor

@jbocce - could you update the branch please?

…orrectly-showing-current-date-for-blank-study-and-series-dates
@jbocce
Copy link
Collaborator Author

jbocce commented Jun 27, 2023

@jbocce - could you update the branch please?

done

Copy link
Contributor

@wayfarer3130 wayfarer3130 left a comment

Choose a reason for hiding this comment

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

Agreed that the No Study Date is the right labelling, so approving for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants