Skip to content

Comments

[FHIR-Tools] [Bug fixes] VTL 2.0 syntax and special char in "short" field#114

Merged
sameeragunarathne merged 3 commits intoballerina-platform:mainfrom
Sanjana-Attanayake:fixes-new
Jul 14, 2025
Merged

[FHIR-Tools] [Bug fixes] VTL 2.0 syntax and special char in "short" field#114
sameeragunarathne merged 3 commits intoballerina-platform:mainfrom
Sanjana-Attanayake:fixes-new

Conversation

@Sanjana-Attanayake
Copy link
Contributor

@Sanjana-Attanayake Sanjana-Attanayake commented Jul 4, 2025

Purpose

This PR is related to:

Goals

Commit 1
This commit solves the issue when parsing field values with special characters embedded to it without any separator. In the spoken scenario an asterisk (*) mark is included to a field value causing it to generate a ballerina variable with a special character causing a syntax error.

Commit 2
The VTL 2.0 update has removed $velocity.count with $foreach.count. The 3rd commits changes this value in the fhir_resource.vm file, and re-add the union operator (|) so that array elements can have multiple datatypes.

Notes

  • The code type is already handled separately by converting it into an ENUM record with all valid values.
  • VTL 2.0 syntax updates

User stories

N/A

Release note

This bug fix will address the rare case of an element being extended from a Primitive type.

Documentation

N/A

Training

N/A

Certification

N/A

Marketing

N/A

Automation tests

Tested with both FHIR versions supported by the current health tool (R4, R5) even though the bug was identified N/A
from FHIR R5 specification.

Security checks

Samples

N/A

Related PRs

FHIR R5 Tooling Support
FHIR-Tools Extend to R5 Element Parsing

Migrations (if applicable)

Migration to Java 21 and Ballerina 2201.12.3 was conducted.

Test environment

Java 21
Ballerina 2201.12.3
Windows 11 Pro

Learning

Europe Base Documentation
Velocity Template Language (VTL) Documentation

@sameeragunarathne sameeragunarathne merged commit 043a627 into ballerina-platform:main Jul 14, 2025
2 checks passed
@Sanjana-Attanayake Sanjana-Attanayake deleted the fixes-new branch July 23, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants