Releases: aehrc/sof-mssql
v2.1.0
This release adds support for the repeat directive in ViewDefinitions, enabling recursive traversal of tree structures such as QuestionnaireResponse.item hierarchies.
New features
Repeat directive
Implements the SQL on FHIR v2 repeat directive which enables recursive traversal of nested structures using T-SQL recursive Common Table Expressions (CTEs).
- Single-path repeat (e.g.,
repeat: ["item"]) - Multi-path repeat (e.g.,
repeat: ["item", "answer.item"]) - Nested
forEach/forEachOrNullinside repeat - Combined with
unionAll(CTEs consolidated into single WITH clause) - Uses SQL Server default MAXRECURSION (100)
Configurable request timeout
Adds --request-timeout CLI flag to configure the mssql request timeout when loading NDJSON files, with a default of 300000ms (5 minutes). This allows large NDJSON files to be loaded without timing out during bulk insert operations.
Also supports MSSQL_REQUEST_TIMEOUT environment variable.
v2.0.0
New Features
Type tag support:
- Added
tagarray toViewDefinitionColumnfor type hints - Two tag types supported:
tsql/type- Direct T-SQL type specification (e.g.,DATE,VARCHAR(50))ansi/type- ANSI/ISO SQL standard types, auto-converted to T-SQL (e.g.,INTEGER→INT,BOOLEAN→BIT)
- Type precedence:
tsql/type>ansi/type> FHIR defaults
Example:
{
"name": "birthDate",
"path": "birthDate",
"tag": [{ "name": "tsql/type", "value": "DATE" }]
}Improvements
- Enhanced SQL injection protection with comprehensive validation
- Better identifier validation for resource types and column names
Breaking Changes
- Temporal types (
date,datetime,instant,time) now useVARCHARinstead of native SQL types to preserve FHIR semantics (partial dates, timezone precision) decimalnow usesVARCHAR(MAX)instead ofDECIMAL(18,6)to support arbitrary precisionid,uuid,oidnow useVARCHARwith size constraints instead ofNVARCHAR(MAX)
v1.0.1
Fixed problem with missing production dependency for load script.
v1.0.0
v1.0.0