Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-38760

Remove FhirPath dependency in expressions



    • Change Request
    • Resolution: Not Persuasive
    • Medium
    • US National Directory Query (FHIR)
    • 1.0.0-ballot
    • Patient Administration
    • (many)
    • Hide

      We do not intend to restrict the SearchParameters supported by FHIR release 4.0.1 in the combined IG.

      We do not intend to restrict the SearchParameters supported by FHIR release 4.0.1 in the combined IG.
    • Bob Dieterle / Brian Postlethwaite: 9-0-0


      The FHIR At Scale Taskforce (FAST) has been investigating how to make search queries on the National Directory more scalable.  Scalability involves multiple considerations, including performance, usability, adoptability, and clarity of documentation; as well as identifying corollary bottlenecks such as inefficient algorithms, broken libraries, unclear syntax, licensing burdens, and other barriers to use. 

      One bottleneck that was identified, with regard to 3rd party apps querying the National Directory, was the dependency on SearchParameters to require the use of FhirPath in the search expressions.  FhirPath is a niche query syntax that has very little adoption outside the FHIR ecosystem.  Web and app developers are far more likely to already be using tools such as xPath, jsonPath, and mongo search queries. 

      Happily, FhirPath shares some structural similarities with xPath, jsonPath, and mongo search queries, and it is possible to construct a limited shared syntax that is usable by all three query syntaxes.  To do so requires foregoing expression evaluations, and focusing on structural path notation.  So, pipe delimiters which express a logical OR operation are problematic, as are extensions, and where() operators.  Basic doted notation, or path traversal through a hierarchical tree object (such as XML or JSON), is the lowest common denominator that can work in xPath, jsonPath, and mongo search queries.  

      As such, we propose a change to the SearchParameters, whereby we pull out the base resource type into the SearchParamter.base field; eliminate logic expressions such as pipe delimiters, where() clauses, and extensions; and focus on expressing the search paths in fully expressed dotted notation.  

      By making these changes, developers will be able to create 3rd party apps that can consume the SearchParameter expressions without the need of a FhirPath library, and relay on the libraries that they are already using.  In particular, this change supports native Mongo database queries.  Implementations that already have a FhirPath library installed, should be able to use the explicit dotted notation without major changes to their codebase.  

      For next steps, it is recommended to review commit 75c82c4ba2924b589664e4e7562eb10adea7637f, which will best explain the proposed changes:

      Pull Request:

      Pull Request Dependency:
      This pull request is dependent upon PR #30 having been accepted





            Unassigned Unassigned
            awatson1978 Abigail Watson
            Abigail Watson
            3 Start watching this issue