[FHIR-Tools] [Bug fixes] VTL 2.0 syntax and special char in "short" field#114
Merged
sameeragunarathne merged 3 commits intoballerina-platform:mainfrom Jul 14, 2025
Merged
Conversation
- This PR is fix the [error of parsing special chars](ballerina-platform/ballerina-library#8000)
isuruh15
reviewed
Jul 8, 2025
native/fhir-to-bal-lib/src/main/resources/templates/fhir_resource.vm
Outdated
Show resolved
Hide resolved
sameeragunarathne
approved these changes
Jul 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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