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

Concept code values can be corrupted if they are coerced into large numeric values #280

Open
eedrummer opened this issue Sep 3, 2020 · 1 comment

Comments

@eedrummer
Copy link
Contributor

The component that handles code values in the module builder, for example procedure_code.code in an ImagingStudy state, will coerce a value that is all numeric characters to a JavaScript Numeric type. For some SNOMED codes, such as 16335031000119103, which is used in the lung cancer module, the numeric representation is beyond the precision of the JavaScript interpreter. The loss of precision causes the code to actually change.

Code values should all be treated as strings, even if they are only numeric characters.

@dehall
Copy link
Contributor

dehall commented Sep 3, 2020

I think this is the offending function:

export function normalizeType(value){

Called from here:
https://github.com/synthetichealth/module-builder/blob/master/src/reducers/editor.js#L260

This may be trickier to fix than I originally suspected...

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

No branches or pull requests

2 participants