共用方式為


Build patient cohorts with generative AI in healthcare data explorer (preview)

[This article is prerelease documentation and is subject to change.]

Healthcare data explorer (preview) is a tool that uses generative AI to help you build patient cohorts faster and easier, without needing any advanced programming skills. You can then use the cohorts for different purposes, such as:

  • Health trend studies
  • Quality assessments
  • Clinical trials
  • Historical research

Using generative AI to build queries is an iterative process. Here's a high-level overview:

  1. Start by generating query criteria with natural language input: Describe the patients you're looking for by using natural language in a generative AI copilot experience.

  2. Refine the query criteria: Adjust the query as needed. Update the query criteria by entering more natural language input, or by editing the criteria manually.

  3. Run the query: Test the query to see how well it performs at retrieving matching patients for the cohort.

  4. Iterate: Evaluate the results. Repeat the process until you're satisfied.

Generate a query with natural language input

Healthcare data explorer (preview) uses AI to help you design your queries.

  1. Navigate to your workspace and open your healthcare data explorer (preview) item.

  2. On the top navigation bar, select Query Builder.

  3. Review the terms and conditions and the AI transparency note, and then select Get started.

    A screenshot showing the query builder starting page.

  4. In the Query Builder textbox, enter a question and then select the paper airplane icon. For examples of what you can enter, see Filter the data with natural language input.

  5. Review the query criteria. Repeat steps 4 and 5 until you're satisfied.

    A screenshot showing an example of a natural language question in the query builder textbox.

Filter the data with natural language input

Here are some examples of how to use natural language to filter patient data based on diagnoses, medications, demographics, procedures, encounters, and dates.

Diagnosis filtering

  • Single condition: Find patients diagnosed with gallstones.
  • Multiple conditions: Identify patients diagnosed with high cholesterol and diabetes.

Medication history filtering

  • Single medication: Retrieve patients who took lisinopril 10-mg oral tablet.
  • Multiple medications: Locate patients who received a 1-ml epoetin alfa 4000 unit injection and also took prednisone.

Demographic filtering

  • Retrieve patients over the age of 35.
  • Find African American patients.
  • Find Hispanic patients.

Procedure filtering

  • Find patients who had an appendectomy.

Encounter filtering

  • Identify patients who had an appendectomy after January 1, 2020.

Date filtering

  • Retrieve patients who took prednisone after July 10, 2023.

Cross-condition filtering

You can combine multiple conditions such as (Patients with {Diagnosis} x {Medication} x {Demographics} x {Procedure} x {Encounter}). For example:

  • Patients who received a 1-ml epoetin alfa 4000 unit injection, took prednisone, and are over 30 years old.
  • Patients diagnosed with epilepsy and asthma, or patients diagnosed only with diabetes mellitus.

Refine the query criteria manually

Healthcare data explorer (preview) uses AI to convert your natural language requests into query criteria. But, it might not always be accurate. You can modify the AI-generated query manually or create one from scratch by using the Criteria builder. The criteria builder automatically populates fields based on the dataset connected in your organization's Fabric lakehouse. You can refine your search by setting criteria, choosing an operator, and specifying a value. You can also combine multiple criteria by using the AND or OR operators for more complex searches.

  1. On the Criteria canvas, select the pencil icon.

  2. In the Criteria builder pane, refine the criteria. If you aren't sure which data fields you can filter by, the Criteria builder dialog is a useful tool to explore the data. For example, you can filter patient data by expanding fields such as year of birth, conditions by concept code, or gender.

  3. Select Update criteria.

    A screenshot showing how to use the criteria builder.

Run the query

There are two different ways to run a query.

  • On the Criteria canvas, select the Run query button. Healthcare data explorer (preview) generates a SQL code based on the query criteria, and then executes the SQL query against the dataset to create a cohort.

    A screenshot showing the run query button on the criteria canvas.

OR

  • On the top toolbar, expand the Run dropdown list, and select either Generate SQL, Execute SQL, or Generate and Execute SQL.

    A screenshot showing the run query dropdown list on the top toolbar.

View the SQL code for the query

To view the SQL code for the query, select Query on the bottom toolbar.

A screenshot showing the query button on the bottom toolbar.

View patients that match the query criteria

To view the matching patient records, select Viewer on the bottom toolbar.

A screenshot showing the viewer button on the bottom toolbar.

View demographic statistics about the dataset

To view aggregate demographic statistics about the patient dataset, select Overview on the bottom toolbar.

A screenshot showing the overview button on the bottom toolbar and sample demographic statistics.

See also