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) O3-3571: Use issued property to determine when test results were issued #1907

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

arodidev
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This pull request updates the PanelTimelineComponent to use the issued property instead of effectiveDateTime for handling timestamps of observations, necessitated by the fact that the issued property is a more accurate reflector of the date and time in which the order results were submitted.

Screenshots

Before:
Screenshot 2024-07-11 at 13 11 14

After:
Screenshot 2024-07-11 at 13 02 02

Related Issue

https://openmrs.atlassian.net/browse/O3-3571

Other

Copy link
Contributor

@CynthiaKamau CynthiaKamau left a comment

Choose a reason for hiding this comment

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

You might want to update some tests

@pirupius pirupius requested a review from ibacher July 11, 2024 13:32
@reagan-meant
Copy link

Works as expected.

@denniskigen denniskigen requested a review from brandones July 15, 2024 19:46
@brandones
Copy link
Contributor

Please fix CI

@arodidev arodidev force-pushed the fix-bug-on-panel-timeline-view branch from 7eec2cf to 1a5b44c Compare July 16, 2024 09:35
@denniskigen denniskigen changed the title (fix) O3-3474 : Update PanelTimelineComponent to Use issued Property for Timestamps (fix) O3-3474: Use issued property to determine when test results were issued Jul 16, 2024
@brandones
Copy link
Contributor

@arodidev Ticket O3-3474 is the Epic "Lab Orders: Next." PRs should be attributed to individual tickets, not Epics. Please file a ticket under O3-3474 and link that to this PR instead. Please include some details about how this decision was made—link to conversations in Talk or Slack, name what person or org made the decision, etc. If you made this decision yourself, please include your reasoning with greater detail (why exactly is issued more accurate?).

@ojwanganto
Copy link

@arodidev Ticket O3-3474 is the Epic "Lab Orders: Next." PRs should be attributed to individual tickets, not Epics. Please file a ticket under O3-3474 and link that to this PR instead. Please include some details about how this decision was made—link to conversations in Talk or Slack, name what person or org made the decision, etc. If you made this decision yourself, please include your reasoning with greater detail (why exactly is issued more accurate?).

Just to add to this, which Observation property maps to what in OpenMRS Obs? Does the issued map to obs date or order date (if present)? I know we have cases i.e. Viral load tests that take time i.e. a week or so for results to be back and you want to accurately map the result to the date when the order was requested/sample collected.

@ibacher
Copy link
Member

ibacher commented Jul 16, 2024

Does the issued map to obs date or order date (if present)?

Obs date. "Issued" means the date that the data was available in the system, so regardless of when it was ordered, that seems like the right value. I can't understand why you would want to use the order date here... maybe the sample collection date if we tracked that.

@arodidev arodidev changed the title (fix) O3-3474: Use issued property to determine when test results were issued (fix) O3-3571: Use issued property to determine when test results were issued Jul 17, 2024
@arodidev
Copy link
Contributor Author

arodidev commented Jul 17, 2024

@arodidev Ticket O3-3474 is the Epic "Lab Orders: Next." PRs should be attributed to individual tickets, not Epics.

Thanks @brandones, I've updated the title to reflect the same.

Please include some details about how this decision was made—link to conversations in Talk or Slack, name what person or org made the decision, etc. If you made this decision yourself, please include your reasoning with greater detail (why exactly is issued more accurate?).

Regarding this, I posted some of my findings on the jira ticket comments.

@ojwanganto
Copy link

Does the issued map to obs date or order date (if present)?

Obs date. "Issued" means the date that the data was available in the system, so regardless of when it was ordered, that seems like the right value. I can't understand why you would want to use the order date here... maybe the sample collection date if we tracked that.

Thanks, @ibacher. I know there are time-sensitive tests like viral load at 6 months, 12 months etc which track the result using date of sample collection. Correctly setting the obs date during data entry addresses my concern. Thanks, @arodidev

@brandones
Copy link
Contributor

Thanks @arodidev , thanks all.

@brandones brandones merged commit 8893138 into openmrs:main Jul 17, 2024
6 checks passed
@ibacher
Copy link
Member

ibacher commented Jul 17, 2024

Actually, on reviewing things, I think this PR is incorrect. Specifically, the issuedDate is kinda unique, but that's because we're using the Obs dateCreated field to map to that. The effectiveDate is, semantically, the right thing. That is to say, I think the error here is not in the results viewer but in the way the obs were collected. If we use the issuedDate, anything entered retrospectively will show up with the wrong date.

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.

6 participants