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

Remove FhirPath dependency in expressions

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Not Persuasive
    • Icon: Medium 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.

      Show
      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

    Description

      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:
       
      https://github.com/HL7/fhir-directory-query/pull/32/commits/75c82c4ba2924b589664e4e7562eb10adea7637f

      Pull Request:
      https://github.com/HL7/fhir-directory-query/pull/32

      Pull Request Dependency:
      This pull request is dependent upon PR #30 having been accepted
      https://github.com/HL7/fhir-directory-query/pull/30

      Preview:
      https://build.fhir.org/ig/HL7/fhir-directory-query/branches/31-remove-fhirpath-dependency/

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: