-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
fhirpathRelated to fhirpath reference implementationRelated to fhirpath reference implementationsqlonfhirChanges that relate to SQL on FHIR functionalityChanges that relate to SQL on FHIR functionality
Description
Implement support for the %rowIndex environment variable as defined in the SQL on FHIR ViewDefinition spec.
%rowIndex is a built-in environment variable that provides the 0-based index of the current element within the collection being iterated by forEach, forEachOrNull, or repeat. At the top level (no iteration), it evaluates to 0. Each nesting level maintains independent %rowIndex values.
Use cases:
- Preserving ordering — SQL result sets lack inherent ordering, so including the original index allows users to restore the sequence of FHIR data elements
- Disambiguation — when resources contain multiple repeating elements (e.g. multiple patient names), the index distinguishes first, second, etc.
- Surrogate keys — combining resource ID with element index creates unique row identifiers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fhirpathRelated to fhirpath reference implementationRelated to fhirpath reference implementationsqlonfhirChanges that relate to SQL on FHIR functionalityChanges that relate to SQL on FHIR functionality
Type
Projects
Status
Planned