microsoft / FHIR-Converter

Conversion utility to translate legacy data formats into FHIR
MIT License
413 stars 180 forks source link

CodeSystem/Langugage.liquid has all empty ifs #305

Closed ewoutkramer closed 3 years ago

ewoutkramer commented 3 years ago

The contents of https://github.com/microsoft/FHIR-Converter/blob/main/data/Templates/Hl7v2/CodeSystem/_Language.liquid, start like this:

  {% if inCode == '' -%}
    "code" : "ar",
    "display" : "Arabic",
    "system" : "urn:ietf:bcp:47",
    {% elsif inCode == '' -%}
    "code" : "bn",
    "display" : "Bengali",
    "system" : "",
    {% elsif inCode == '' -%}
    "code" : "cs",
    "display" : "Czech",
    "system" : "",

It looks like there is issue in the generated code, since all comparison cases are against the empty string.

ACMoretxj commented 3 years ago

Thanks for pointing out this issue. Currently we don't have enough knowledge of the conversion relationship of Language, so we keep it empty here. The default template is a starting point and users can customize the templates based on their knowledge.

BTW, the dotliquid templates in CodeSystem folder are not being used, the https://github.com/microsoft/FHIR-Converter/blob/main/data/Templates/Hl7v2/CodeSystem/CodeSystem.json is being used instead. The Language template in it is clearer(since it's just empty). To avoid showing these empty string comparisons, we are going to remove the liquid tempates in CodeSystem folde later.

ACMoretxj commented 3 years ago

Latest Update: We've removed unused CodeSystem and ValueSet templates in #306 for consistency, and this feature will be released to main branch soon.

ACMoretxj commented 3 years ago

Latest Update: We've removed unused CodeSystem and ValueSet templates in #306 for consistency, and this feature will be released to main branch soon.

Update: The feature has been released to main branch now.