Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

CDA extract_scalar doesnt play nice with floats #250

Open
Wylan opened this issue Jan 21, 2015 · 1 comment
Open

CDA extract_scalar doesnt play nice with floats #250

Wylan opened this issue Jan 21, 2015 · 1 comment
Assignees

Comments

@Wylan
Copy link

Wylan commented Jan 21, 2015

I recently noticed that when importing sections that have a scalar unit (such as the dosage for a medication) that the value is being converted to an integer.

It looks like the culprit is the to_i on line 193 of lib/health-data-standards/import/cda/section_importer.rb.

{'unit' => scalar_element['unit'], 'value' => scalar_element['value'].to_i}

Will it break anything if we change this to to_f instead?

@okeefm okeefm self-assigned this Feb 6, 2015
@okeefm
Copy link
Contributor

okeefm commented Feb 6, 2015

I ran a few tests, and it doesn't look like this should break anything. I'll bring it up to some of the other developers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants