Skip to main content

The ED Custom Search allows users to develop and save custom definitions for emergency department visit data based on chief complaint, triage notes, and/or diagnosis codes. This user guide provides additional guidance to ensure that you build your definitions as accurately as possible, but when using the report users must acknowledge that results may vary based on the accuracy of search criteria included and/or syntax used.

 

Getting Started

When you use the report for the first time, you will see an empty table. Click on New Custom Search to get started on building a new definition.

Figure 1: ED Custom Search – Table of Custom Search Definitions

Screenshot of ED Custom Search Report Table of Custom Search Definitions with green square highlighting the New Custom Search hyperlink.

ED Custom Search – Select Criteria

In the ED Custom Search users can select the the following:

  1. Date Range (2009 to present)
  2. Location (based on user role)
  3. Optional filters: Optional filters (not shown) include Age Group (grouped into six or nine age groups), Gender, Race, Ethnicity, Disposition, Insurance Coverage and Transport Mode.

Note that date range, location, and optional filter criteria are NOT saved along with a definition when a user elects to save a definition of chief complaint and/or triage note keywords and/or diagnosis codes.

Figure 2: ED Custom Search Criteria

Screenshot of ED Custom Search Report search criteria

Search by Keywords

To include a keyword search, click Yes and then enter the search terms of interest. Select to search chief complaint only or both chief complaint and triage notes. A search of chief complaint only will be more precise but will not capture as many visits, while a search that includes chief complaint and triage notes will capture more visits but may include visits that you do not want. For example, if you search on “GSW”, a search that includes triage notes will capture visits that include comments like “GSW 3 years ago.”

Keyword Search Strategies and Syntax

  • AND/OR: Search terms should be entered using AND and/or OR statements. An AND statement will require all of the terms, while an OR will return visits with any of the terms. This logic can be combined together provided you use parentheses appropriately. Please note that you can use & (ampersand) in lieu of typing AND, and you can use | (pipe) in lieu of typing OR. See the query examples in this document.
  • Case: your search is NOT case sensitive
  • Exact Terms: Exact words can be typed exactly as you want to search for them. For example, if you want to search for fever, type fever.
  • Abbreviations/Misspellings/Synonyms: This report does not automatically include abbreviations, misspellings or synonyms. You must list all abbreviations, synonyms and misspellings that you want to include.  For example, if you want to search for heroin, you may want to include the following terms: heroin OR heroine OR heronin OR heroin, for example.
  • Word Roots: To simplify your search somewhat, you can put root terms in your search with an * and double quotation marks.  For example, to search on fever, fevers, feverish you can enter your term as follows: “fev*”
  • Phrases: To search on a phrase, put the phrase in double quotation marks. For example, to search for loss of consciousness, enter your term as follows: “loss of consciousness”
  • Exclusion Terms: if you want an ED visit to be excluded from your results based on one or more terms, enter those terms into the exclusion terms box, separated by OR. Note that you cannot search only on exclusion terms. Inclusion keywords must also be in your search if you want to also exclude keywords.

Keyword Search Query Examples

  1. I want to find ED visits for animal or dog bites. I want to be sure to find ED visits that use terms like bit or bitten as well as bite: (dog or canine or animal) AND “bit*”
  2. I want to find ED visits that document both benzodiazepine-type drugs and alcohol: (“benzo*” OR Xanax OR valium OR Ativan OR klonopin OR clonopin) AND (alcohol OR ETOH)
  3. I want to find ED visits that mention fentanyl but exclude visits that mention fentanyl parch(es): fentanyl in the search box and then “fentanyl patch*” in the Exclusion terms box. See Figure 3.

 

Figure 3: Screenshot of Custom Search Keyword Search

Screenshot of ED Custom Search report search criteria with chief complaint and triage notes selected for a search on fentanyl with an exclusion for fentanyl patch.

 

Search by Diagnosis Codes

To include a search by one or more diagnosis codes, click Yes.  For diagnosis code data entry, users can enter diagnosis codes directly into the text box with each code separated by a comma or can use the diagnosis code selector. Note that diagnosis codes cannot be wildcarded; each diagnosis code that you want to include in your search must be listed. ED visits with ANY of the codes entered will be included in your results.

Entering Diagnosis Codes Directly into the Text Box

The screenshot below shows an example of multiple ICD-10-CM diagnosis codes related to stroke.

Figure 4: Search by Diagnosis Codes with Text Box Data Entry

Screenshot of Custom Search Report Diagnosis Code search with multiple codes entered separated by commas with no spaces.

Search by Diagnosis Using Diagnosis Code Selector (ICD-10-CM only)

If you are unsure which codes you want to include in your search, the diagnosis code selector is the better option. Enter a diagnosis term of interest in the search box to narrow down the list of available codes. To select the ICD-10-CM diagnosis codes you want to include in your search, click in the check boxes on the left. Selected diagnosis codes will appear in the Selected Diagnosis Codes box on the right. Clicking the check box at the top of the Select Diagnosis Codes table will include all codes identified in your search. Use the Delete links in the Selected Diagnosis Codes box to delete any codes that you do not want to include in your search. Note that the diagnosis code selector includes ICD-10-CM codes only. If you want to include ICD-9-CM codes in your search (for visits from 2009-10/1/2015) you must enter them into the search box, with each code separated by a comma.

Figure 5: Diagnosis Code Selector

Screenshot of Custom Search using diagnosis code selector with codes for asthma selected.

Additional Diagnosis Code Search Options

Note that ED visits will be included in your results set for ANY of the diagnosis codes included in your text box. If you want to require a combination of one or more diagnosis codes, click Yes next two the question, Do you want to require one or more diagnosis codes (Boolean AND) with the diagnosis code(s) already included in your definition? Then follow the same steps as previously described to enter the diagnosis codes of interest. Use this feature when you want to look at ED visits with more than one condition. If you want to exclude ED visits with one or more diagnosis codes, click Yes next to the question, Do you want to exclude diagnosis codes? And then enter your excluded codes directly into the text box or using the diagnosis code selector. The screen shot below shows an example of excluding the ICD-10-CM code for COVID-19 (U07.1). Note that you must also have one or more inclusion diagnosis codes if you want to exclude diagnosis codes. Figure 6 is a screenshot of a search for a diagnosis of fever, unspecified AND a diagnosis of cough, unspecified but excluding COVID-19. In other words, this searches for ED visits with a diagnosis of fever AND cough or sore throat that did NOT receive a COVID-19 diagnosis.

Figure 6: Diagnosis Code Search with AND and EXCLUSION options

 

Notes on Search Strategy & How Exclusions Operate

  • Searches can include both keyword terms and diagnosis codes. When both keywords and diagnosis codes are included, these searches are combined into an OR statement. In other words, ED visits with any of the keyword terms OR any of the diagnosis codes in your search will be included in the results.
  • Exclusions are specific to keywords or diagnosis codes. If you have an exclusion keyword but also include diagnosis codes in your search, the results set will include ED visits with the any of the included diagnosis codes, even if the excluded keyword is present. Similarly, if you have an excluded diagnosis code but your search includes keywords, your results will include ED visits with those keywords even if the excluded diagnosis code is in an ED visit record.

Saving Custom Search Definitions

In the ED Custom Search report, you have the option to save your custom search definition for future use. This definition is specific to your account and is accessible only to you. Once you are happy with your keyword and/or diagnosis code search criteria and want to save your search, click on the Save Custom Search Definition link at the bottom of the search criteria screen. To access the Save Custom Search Definition link AFTER you have already conducted a search and you are on the line listing results screen, click on the Show Search Parameters link (Figure 7) and then scroll down to the Save Custom Search Definition link.

Figure 7: Click on the Show Search Parameters link to access the custom search save options.

Screenshot of Custom Search report with green square highlighting show search parameters link.

 

  1. Click on the save Custom Search Definition link to open the Dialog Box
  2. Name your Custom Search definition and click on the Save button to save your search criteria. Note that your custom searches are available in the Table and Graph Generator Reports with a Custom Search: prefix.

Figure 8: Saving Custom Search Definitions from Results Page

Screenshot of Custom Search steps to save a custom search with link to Save Custom Search highlighted with a green square and numbered as the first step and the saving the custom search name as the second step.

 

All saved definitions are available in the Table of Custom Search Definitions, which is the landing page for the ED Custom Search report. From this page you can run a search using a saved definition, update an existing definition, or delete an existing definition using the links in the Actions column. To begin a new custom search definition using the link at the top of the table.

Running or Updating Saved Custom Search Definitions

To run or update a saved custom search definition, click on the Run/Update link in the Actions column in your Table of Custom Search Definitions. To conduct a search, select the desired date range, location type and any optional filters and then click search.

To update the keywords and/or diagnosis codes in your saved definition, click on the Update Custom Search Definition link (Figure 9).

Figure 9: Updating an Existing Definition

Screenshot of Custom Search report with link to update an existing definition highlighted with a green square.

Once you have at least one saved custom search definition, you will have an additional save option of Save As Another Custom Search Definition. Click this option if you want to keep your original definition rather than updating it. For example, you may have more than one definition for a similar topic with slightly different search criteria.

Troubleshooting

If the report returns an error after a search and you do not understand why, try the following:

  • Paste your query into Notepad to look for any hidden spaces.
  • Make sure search terms of more than one word have quotation marks around them,
  • If you pasted your query into the search box directly from MS Word or another editing program, note that the quotation marks may not be recognized by the report. They may be seen as special characters rather than simple quotation marks. You can delete MS Word quotation marks in the interface and then enter them directly.
    • There is an option to turn off the smart quote feature in MS Word by going to File à Options à Proofing à AutoCorrect Options.
      • Click the AutoFormat As You Type tab, and under Replace as you type, select or clear the “Straight quotes” with “smart quotes” check box.
      • Click the AutoFormat tab, and under Replace, select or clear the “Straight quotes” with “smart quotes” check box.

 

Feedback

To provide feedback on this report, please send an email to ncdetect@listserv.med.unc.edu.