-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Description:
LHC Forms currently only supports the deprecated ordinalValue extension for scoring calculations in sdc-questionnaire-calculatedExpression.
In the FHIR Extension pack, http://hl7.org/fhir/StructureDefinition/ordinalValue has been replaced by http://hl7.org/fhir/StructureDefinition/itemWeight. (
As a result, questionnaires using itemWeight (as per the latest FHIR spec) fail to compute calculated scores in LHC Forms, while identical forms using ordinalValue work correctly.
lforms/src/fhir/common/sdc-import-common.js
Lines 53 to 54 in 4c75455
| 'R4': "http://hl7.org/fhir/StructureDefinition/ordinalValue", | |
| 'R5': "http://hl7.org/fhir/StructureDefinition/itemWeight" |
Expected behavior:
LHC Forms should support itemWeight in the same way as ordinalValue when processing calculated expressions. Ideally, both should be accepted for backward compatibility.
Proposed fix:
- Recognize and process itemWeight as equivalent to ordinalValue in the internal normalization logic.
- Maintain backward compatibility for existing forms still using ordinalValue.