# Missing import in OdinParser **Category:** [Implementation](https://discourse.openehr.org/c/implem/39) **Created:** 2023-04-28 22:41 UTC **Views:** 275 **Replies:** 0 **URL:** https://discourse.openehr.org/t/missing-import-in-odinparser/3938 --- ## Post #1 by @richard.kavanagh Working through my implementation of an Odin parser, I notice that the OdinValuesParser may have a slight issue when it comes to handling terminology codes. The grammar contains the following line ``` termCodeValue : QUALIFIED_TERM_CODE_REF ; ``` There is no further breach down of **QUALIFIED_TERM_CODE_REF** within the grammar file. Looking across the other grammar files, it seems that the missing constructs are in the **OpenehrPatterns** grammar file. It contains ``` // ADL and ODIN-style term codes uses []; e.g. [ICD10AM(1998)::F23]; [ISO_639-1::en] // New EL style uses #xxxx QUALIFIED_TERM_CODE_ID: '#' COMPACT_QUALIFIED_TERM_CODE ; LOCAL_TERM_CODE_ID: '#' TERM_CODE_STRING ; QUALIFIED_TERM_CODE_REF: '[' COMPACT_QUALIFIED_TERM_CODE ']' ; fragment COMPACT_QUALIFIED_TERM_CODE : TERM_CODE_STRING ( '(' TERM_CODE_STRING ')' )? '::' TERM_CODE_STRING ( '|' .+? '|' )? ; fragment TERM_CODE_STRING: TERM_CODE_CHAR+ ; fragment TERM_CODE_CHAR : ALPHANUM_US_HYP_CHAR | '.' ; ``` Should this have been an import into the **OdinValuesParser** grammar file? If, so could the grammar below be more descriptive? ``` fragment COMPACT_QUALIFIED_TERM_CODE : TERM_CODE_STRING ( '(' TERM_CODE_STRING ')' )? '::' TERM_CODE_STRING ( '|' .+? '|' )? ; ``` Using **TERM_CODE_STRING** to represent terminology_id.name, terminology_id.version_id and also code_phrase.code_string may benefit from more explicit grammar definitions. Raised as SPECPR-416 just in case --- **Canonical:** https://discourse.openehr.org/t/missing-import-in-odinparser/3938 **Original content:** https://discourse.openehr.org/t/missing-import-in-odinparser/3938