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

$extract returns error for decimal values #481

Closed
simoneOnFhir opened this issue Jun 17, 2024 · 2 comments · Fixed by #505
Closed

$extract returns error for decimal values #481

simoneOnFhir opened this issue Jun 17, 2024 · 2 comments · Fixed by #505
Assignees
Labels
bug Something isn't working CDS All issues related to the CDS project

Comments

@simoneOnFhir
Copy link

$extract-Operation error on observation based extraction for decimal types:

HAPI-0389: Failed to call access method: java.lang.Error: Not the right type for Observation.value[x]: decimal

Questionnaire and Response attached.
Questionnaire-NumericExtract.json
QR.json

the following item causes the issues:

              {
                    "linkId": "baseDataDecimalWeight",
                    "answer": [
                        {
                            "valueDecimal": 23.5
                        }
                    ]
                }

(tested on HAPI FHIR 7.2.0)

@simoneOnFhir
Copy link
Author

Observation.value[x] can't be decimal. facepalm

nevermind

@simoneOnFhir
Copy link
Author

No. My point stands. From the SDC-Specification: "If a questionnaire item has the questionnaire-unit extension, the Observation.value SHOULD be a valueQuantity rather than integer or decimal and the units should be taken from the extension value."

Since the item does have a unit-Extension, the decimal value SHOULD be extracted into Observation.valueQuantity.value where no datatype mismatch occurs.

@simoneOnFhir simoneOnFhir reopened this Jun 17, 2024
@barhodes barhodes self-assigned this Aug 21, 2024
@barhodes barhodes added bug Something isn't working CDS All issues related to the CDS project labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CDS All issues related to the CDS project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants