In the HL7v2 to FHIR conversion CodeSystem templates, their default, i.e., "else" part in the if-then-else rule, is not working.
For example, for Patient.communication.language in the Resource/_Patient.liquid template, it has the following line to map a language code to a dictionary containing "code", "display", and "system".
{% include 'DataType/CWECodeableConcept' mapping: 'CodeSystem/Language', CWE: PID.15 -%}
In the CodeSystem/_Language.liquid template, if no matching code, it would output the input values.
{% else -%}
"code" : "{{ inCode }}",
"display" : "{{ inCode }}",
"system" : "",
{% endif -%}
My case has PID.15="English" and it has no matching code. So, I expect the following output.
{
"code" : "English",
"display" : "English",
"system" : "",
}
What happens is no output at all.
I also tried to add the following rule with no success.
{% elsif inCode == 'English' -%}
"code" : "{{ inCode }}",
"display" : "{{ inCode }}",
"system" : "",
I appears that CodeSystem/_Language.liquid does not take changes, nor does it handle no-matched codes with "else" condition. I tested the changes with the "FHIR Converter" extension in Visual Studio Code. What can I do to make the "else" condition in CodeSystem/_Language.liquid working?