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

Parse lab values that include a range #452

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

jean-the-coder
Copy link
Contributor

Description

Right now lab values that have a < are parsed as 0. This PR adds some quick parsing so that these are displayed like reference ranges are.

Fixes #441

Changes

  • Update observation model to check for ranged values in valueString and the comparator attribute in valueQuantity and return a ValueObject
  • Update bar chart to use new ValueObject for values instead of value_quantity_value
  • Add valueQuantity trait to observation factory to allow custom values
  • Added an observation bar chart story to test display of a ranged value
    • Note: The tooltip is a little wonky with the text display and the color of the result is a little off if there is also a range, but I figure for now this is fine as at least the result is readable without having to dig into the debug json Screen Shot 2024-03-17 at 11 25 30 PM

@@ -15,7 +15,7 @@ const defaultChartEntryHeight = 30;
styleUrls: ['./observation-bar-chart.component.scss']
})
export class ObservationBarChartComponent implements OnInit {
@Input() observations: [ObservationModel]
Copy link
Member

@AnalogJ AnalogJ Mar 18, 2024

Choose a reason for hiding this comment

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

🤦 - good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol, hey, that 🤦is mine. I'm the one who made this file 😆

I just find it interesting that it all worked regardless. I only noticed it because I was doing some testing in my other branch that has a lot more change going on and storybook finally complained near the end of my changes.

Copy link
Member

Choose a reason for hiding this comment

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

haha, don't be too hard on yourself, I've definitely done stuff like that -- I thought you copy pasted this from my original file :D

@AnalogJ AnalogJ merged commit 1bcf4aa into fastenhealth:main Mar 18, 2024
4 checks passed
@jean-the-coder jean-the-coder deleted the value-range-parsing branch March 18, 2024 05:01
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.

[Bug]: Lab Values reported as "<" are shown as 0
2 participants