Uploaded image for project: 'Reporting Module'
  1. Reporting Module
  2. REPORT-796

[Reporting REST] Easy API for evaluating composition cohort queries

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • TBD
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Undetermined

    Description

      We have some built-in cohort queries available via definition libraries, and we'll continue to add more.

      Commonly, a consumer wants to evaluate a composition of these built-in queries (e.g. in HIV Program AND NOT had encounter this month).

      At present you can do this by POSTing serialized XML of the cohort definition (extremely unintuivite to use), or via the adhocquery endpoint (more powerful and complex than needed).

      We should provide a simple REST API for this specific use case.

      Proposal

      I propose we support:

      POST .../cohort
      {
        composition: {
          compositionString: "1 AND 2",
          searches: {
            "1": {
              key: "reporting.library.cohortDefinition.builtIn.males"
            },
            "2": {
              key: "reporting.library.cohortDefinition.builtIn.atLeastAgeOnDate",
              parameterValues: {
                "minAge": 15
              }
            }
          }
        }
      }
      

      Questions

      Should we also support global parameter values, as is done in the adhocquery resource? (E.g. so that setting "startDate" on the top level will automatically be mapped down to any individual query with a "startDate" parameter.)

      Gliffy Diagrams

        Attachments

          Activity

            People

              Unassigned Unassigned
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: