Parse reference ranges that use <
and >
#450
Merged
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.
Description
Right now only the reference range's
high
andlow
attributes are checked which leads to reference ranges in text format not being parsed or displayed. There are also issues displaying when only a low is set as the chart library doesn't know how to plot from<number>
tonull
.This PR updates how we parse Observation reference ranges so that both object forms and string forms of these attributes are parsed and displayed correctly. I've also moved the bar chart code into its own component so that it can be used for both the resource observation and the report labs observation without duplicating code.
Fixes #440
Changes
_mixins.scss
because the deprecation warnings were getting annoyingparseFloat()
which will error out if the text isn't only a string. I plan to fix this in my next PR. This PR is large enough as is so I figured better to get its review started while I work on this functionality.Updated dependencies
Production dependencies
chart.js
:^4.0.1
->^4.4.2
Dev dependencies
fishery
jasmine-core
jasmine-spec-reporter
karma
karma-chrome-launcher
karma-coverage
karma-jasmine
karma-jasmine-html-reporter