You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've attempted to utilize fhir.r4 version 5.5.1 alongside the latest Handlebars.Net version 2.1.6. However, it appears that the configuration (UpperCamelCaseExpressionNameResolver), which we're adding to convert expression names, is causing some complications, leading to deviations from the expected behavior.
example Link : - LinkToExample
Expected behavior:
Regardless of whether we include "ExpressionNameResolver = new UpperCamelCaseExpressionNameResolver()" in the configurations, the following content should appear twice, reflecting the two entries in the bundle we provide.
<content xsi:type="OBSERVATION" archetype_node_id="openEHR-EHR-OBSERVATION.blood_pressure.v1">
<name>
<value>there is entry</value>
</name>
</content>
<content xsi:type="OBSERVATION" archetype_node_id="openEHR-EHR-OBSERVATION.blood_pressure.v1">
<name>
<value>there is entry</value>
</name>
</content>
usingConsoleApp1;usingHandlebarsDotNet;usingHandlebarsDotNet.Compiler.Resolvers;usingHl7.Fhir.FhirPath;usingHl7.Fhir.Model;usingHl7.Fhir.Serialization;usingSystem;usingSystem.Collections.Generic;usingSystem.IO;//Example 1//with fhir resource data passing as data to templatevarbundle=newBundle{Type=Bundle.BundleType.Collection};// Create the first entryvarentry1=newBundle.EntryComponent{FullUrl="fullurl1",Resource=newObservation{Id="observation1",Code=newCodeableConcept("http://loinc.org","12345","Some observation")}};// Create the second entryvarentry2=newBundle.EntryComponent{FullUrl="fullurl2",Resource=newObservation{Id="observation2",Code=newCodeableConcept("http://loinc.org","67890","Another observation")}};// Add the entries to the bundlebundle.Entry.Add(entry1);bundle.Entry.Add(entry2);Hl7.Fhir.Model.Resourcers=bundle;// Render the template with the bundlevardatax=new{resource=rs};// here having UpperCamelCaseExpressionNameResolver HandlebarsConfigurations_configuration=newHandlebarsConfiguration{ExpressionNameResolver=newUpperCamelCaseExpressionNameResolver()};//without having UpperCamelCaseExpressionNameResolver//uncomment the below code and check the behaviour without the UpperCamelCaseExpressionNameResolver//HandlebarsConfiguration s_configuration = new HandlebarsConfiguration { };IHandlebarss_handlebars=Handlebars.Create(s_configuration);vartemplate=File.ReadAllText(@"./Textfiles/Composition-template.hbs");varcompiledTemplate=s_handlebars.Compile(template);stringtemplateOutput=compiledTemplate(datax);//here with UpperCamelCaseExpressionNameResolver you will not get <content> under {{#each resource.entry}} but without UpperCamelCaseExpressionNameResolver u will get it .Console.WriteLine(templateOutput);
Other related info
This phenomenon occurs specifically when we utilize HL7 FHIR R4 version 5.5.1 related FHIR resources. Hence, I suspect it might be attributed to a modification they implemented from their end.
After submitting the issue
please go through the issue and let me know whether there is any modification can be done to fix the given issue while we are using the specific configuration( pperCamelCaseExpressionNameResolver ) under handlebarconfigurations.
The text was updated successfully, but these errors were encountered:
kalleo1996
changed the title
Some configuration causing issues while working with HL7.FHIR.R4 version 5.5.1
UpperCamelCaseExpressionNameResolver configuration causing issues while working with HL7.FHIR.R4 version 5.5.1 in Handlebar.net
May 16, 2024
Describe the bug
I've attempted to utilize fhir.r4 version 5.5.1 alongside the latest Handlebars.Net version 2.1.6. However, it appears that the configuration (UpperCamelCaseExpressionNameResolver), which we're adding to convert expression names, is causing some complications, leading to deviations from the expected behavior.
example Link : - LinkToExample
Expected behavior:
Regardless of whether we include "ExpressionNameResolver = new UpperCamelCaseExpressionNameResolver()" in the configurations, the following content should appear twice, reflecting the two entries in the bundle we provide.
Test to reproduce
full example is available in thisLink
Other related info
This phenomenon occurs specifically when we utilize HL7 FHIR R4 version 5.5.1 related FHIR resources. Hence, I suspect it might be attributed to a modification they implemented from their end.
After submitting the issue
please go through the issue and let me know whether there is any modification can be done to fix the given issue while we are using the specific configuration( pperCamelCaseExpressionNameResolver ) under handlebarconfigurations.
The text was updated successfully, but these errors were encountered: