NIAD-3070: Quantity encoding behaviour is wrong.#793
Merged
MartinWheelerMT merged 10 commits intomainfrom Jul 25, 2024
Merged
Conversation
…ValueQuantityMapper Update Tests for these changes. Remove the source XML files no longer required
…essureMapperTest to ignore the whitespace changes in XML formatting for Quantities. Update ObservationValueQuantityMapper to ensure correct mapping of interval physical quantities Add Unit tests for uncertainty Update unit tests to check for any system or none. Update tests files for interval tests to reflect new mapping.
49c2a6a to
9d7aaba
Compare
…ot generate a quantity if the value is not present in the valueQuantity Remove duplicate unit test
ffa9c3c to
8d64c02
Compare
6362b13 to
aed5937
Compare
Add tests to cover all permutations of ObservationValueQuantityMapper Update ObservationValueQuantityMapper to properly handle system values
… `urn:uuid:` Update existing tests to support this change
… having them as constants
adrianclay
approved these changes
Jul 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
ObservationQuantityValueMapper has been updated to produce the correct output as specified in the MIM.
If
valueQuantity.valueis missing then the element will not be mapped.If the system value is invalid, it should be handled in the same way as below, but as if the system value was not set.
Valid
systemvalues are:Otherwise the mapping mapping will now be as follows, mapping to interval if
valueQuantity.comparatoris present, or to a standard QuantityQuantity (Physical Quantity: PQ)
Given a FHIR Quantity containing both a system and code where system is equal to “http://unitsofmeasure.org" then the value should be converted to XML as:
Otherwise, given a FHIR Quantity containing a system, code and unit where the system is anything else then the value should be converted to XML as:
Otherwise, given a FHIR Quantity containing a system and code where the system is anything else then the value should be converted to XML as:
Otherwise, given a FHIR Quantity containing a unit then the value should be converted to XML as:
Otherwise, given a FHIR Quantity containing just a value (no unit, no code, no system), then the value should be converted to XML as:
Interval (Physical Quantity Interval (IVL_PQ)
Given a FHIR Quantity described as an interval, then the same rules as above apply, but with value element being named high or low according to the existing behaviour, wrapped in a value element.
Why
It was identified during testing that the mapping of
Observation.valueQuantitywas not producing the correct XML in certain circumstances.Type of change
Please delete options that are not relevant.
Checklist: