Grammar should allow more flexibility for order of declarations

XMLWordPrintableJSON

    • Type: Change Request
    • Resolution: Persuasive
    • Priority: Medium
    • Clinical Quality Language (FHIR)
    • 1.5 [deprecated]
    • Clinical Decision Support
    • Grammar
    • Hide

      Create a "definition" production rule:

      definition:

      usingDefinition
      includeDefinition
      codeSystemDefinition
      valueSetDefinition
      codeDefiniition
      conceptDefinition
      parameterDefinition

      ;

      Change library to:

      library:

      libraryDefinition?

      defintion*

      statement*

      ;

       

      Show
      Create a "definition" production rule: definition: usingDefinition includeDefinition codeSystemDefinition valueSetDefinition codeDefiniition conceptDefinition parameterDefinition ; Change library to: library: libraryDefinition? defintion* statement* ;  
    • Chris Moesel/Ben Hamlin: 25-0-0
    • Enhancement
    • Non-substantive

       

      The grammar defines the following order of declarations:

      library
          :
          libraryDefinition?
          usingDefinition*
          includeDefinition*
          codesystemDefinition*
          valuesetDefinition*
          codeDefinition*
          conceptDefinition*
          parameterDefinition*
          statement*
          EOF
          ; 

      It's been like this from the start, but... I find the forced order to be too rigid, and other authors have noted this as well.  In particular, all the terminology-based declarations should be able to be intermingled.

      For example, an author might want to first declare all diabetes-related codes, concepts, value sets, and code systems together; and then declare all CVD-related codes, concepts, value sets, and code systems together; and then some other topic, etc.  The current rigidity of having to declare every code system first, and then every value set, and then every code, etc makes this impossible.

      Similarly, when declaring Concepts, you must first declare a Code to go into the concept literal declaration.  So you must do things like this:

      code "Tobacco smoking status code": '72166-2' from "LOINC" display 'Tobacco smoking status'
      code "CVD 10-year risk code": '79423-0' from "LOINC"  display 'Cardiovascular disease 10Y risk [Likelihood] ACC-AHA Pooled Cohort by Goff 2013'
      code "Pregnancy status code": '82810-3' from "LOINC" display 'Pregnancy status'
      concept "Tobacco smoking status": { "Tobacco smoking status code" } display 'Tobacco smoking status'
      concept "CVD 10-year risk": { "CVD 10-year risk code" }  display 'Cardiovascular disease 10Y risk [Likelihood] ACC-AHA Pooled Cohort by Goff 2013'
      concept "Pregnancy status": { "Pregnancy status code" } display 'Pregnancy status'

      when something like this would probably be more maintainable:

      code "Tobacco smoking status code": '72166-2' from "LOINC" display 'Tobacco smoking status'
      concept "Tobacco smoking status": { "Tobacco smoking status code" } display 'Tobacco smoking status'
      
      code "CVD 10-year risk code": '79423-0' from "LOINC" display 'Cardiovascular disease 10Y risk [Likelihood] ACC-AHA Pooled Cohort by Goff 2013'
      concept "CVD 10-year risk": { "CVD 10-year risk code" } display 'Cardiovascular disease 10Y risk [Likelihood] ACC-AHA Pooled Cohort by Goff 2013'
      
      code "Pregnancy status code": '82810-3' from "LOINC" display 'Pregnancy status'
      concept "Pregnancy status": { "Pregnancy status code" } display 'Pregnancy status'

      We should at least consider allowing more flexibility in the ordering of these statements.

            Assignee:
            Bryn Rhodes
            Reporter:
            cmoesel
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: