Advanced Search Syntax

Advanced users can use the following special characters in the search string.

Special Characters Definition
+ The "+" or required operator requires that the term after the "+" symbol exists somewhere in each search result. As described in the Basic Search Syntax section, the "+" and the AND operators are interchangable, and when no operator is specified, "+" is implied. To search for records that must contain anthracis and may contain bacillus use the query:

bacillus +anthracis

- The "-" or prohibit operator excludes records that contain the term after the "-" symbol. To search for records that contain bacillus but not anthracis use the query:

bacillus -anthracis

( ) Parentheses can be used to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query. To search for records that contain either influenza or rhinovirus and not haemophilus use the query:

(influenza OR rhinovirus) -haemophilus

Parentheses can also be used to search for multiple search terms in a single field. To search for terms that contain the words opiates and confirm in the Component use the query:

Component:(opiates confirm)

To search for terms that contain the word opiates or the word confirm in the Component use the query:

Component:(opiates OR confirm)

~ To do a fuzzy search use the tilde symbol ("~") at the end of a single search term. Fuzzy searches can be used when you are not sure about the spelling of a word. For example, to search for a term similar in spelling to "haemofhilus" use the fuzzy search:

haemofhilus~

An additional (optional) parameter between 0 and 1 can specify the degree of similarity required. With a value closer to 1, only terms with a higher similarity will be matched. For example:

haemofhilus~0.8

returns a large number of terms, but

haemofhilus~0.95

does not return any.

The default that is used if the optional parameter is not given is 0.5.
" "~ The proximity search allows you to find records containing words within a specific distance of each other. To do a proximity search use the tilde symbol ("~") at the end of a phrase in quotes. For example to search for function and panel within 1 word of each other use the search:

"function panel"~1

[ ]
{ }
Range searches allow you to find records whose field values are between the specified lower bound and upper bound.

To perform an inclusive range search use square brackets. This type of query will return records where the specified field contains the lower bound, the upper bound, or any value between the lower bound and upper bound. For example, to search for Parts created between 20170101 and 20170601, inclusive, use the following query in the Part Search tab:

createdon:[20170101 TO 20170601]

To perform an exclusive range search use curly brackets. This type of query will only return records where the specified field contains a value between the lower bound and the upper bound without containing either the upper or lower bound values themselves. For example, to search for records created between 20170101 and 20170601, exclusive (i.e., not created on either January 1, 2017 or June 1, 2017), use the query:

createdon:{20170101 TO 20170601}

\ Special characters that are part of the query syntax can be escaped and treated as data. The current list of special characters is

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

To escape these characters use the \ before the character. For example to search for O157:H7 use the query

O157\:H7

For basic search syntax see the Basic Search Syntax section.

Advanced LOINC Field Names

Advanced users can use the following field names in the search string.

Note that True and NotNull can be used interchangeably, as can False and Null.

Field Name Definition
AllowMethodSpecific Allowed values:

True

False

This field is used to find LOINC codes with a Method, where either equivalent methodless LOINC codes exist (AllowMethodSpecific:False) or do not exist (AllowMethodSpecific:True). For example, to find codes containing cytomegalovirus that have a Method and for which there are no equivalent methodless LOINC codes use the query:

cytomegalovirus AllowMethodSpecific:True

And to find codes containing cytomegalovirus that have a Method and for which there are equivalent methodless LOINC codes use the query:

cytomegalovirus AllowMethodSpecific:False

AnswerList Allowed values:

True

False

Whether or not a LOINC code has an associated answer list. To search for all the LOINC codes containing glucose that also have an answer list use the query:

glucose AnswerList:true

AnswerListId This field allows you to find all LOINC codes with a specific answer list. For example, to find all LOINC codes with which Answer list LL956-4 is associated, use:

AnswerListId:LL956-4

AnswerListName This field allows you to find LOINC codes whose answer list name contains specific keywords. The following example will return all of the LOINC codes whose assigned answer list has the word "medication" in its name.

AnswerListName:medication

AnswerListType Allowed values:

Example

Preferred

Normative

This field allows you to find LOINC codes by the type of associated answer list. The following example will return all of the LOINC glucose codes that have an associated NORMATIVE answer list.

glucose answerlisttype:normative

See the LOINC Users' guide for the complete list of answer types and their definitions.
AOEObservation Allowed values:

True

False

Ask at order entry observation terms represent additional questions that may be included with an instance of an order. This includes things like fasting status or travel history. You can see a complete list of the AOE questions with the following query:

AOEObservation:True

*Although a value of False is allowed, a search for terms that are not AOE observations would not be particularly useful because only a handful of terms are designated as AOE observations (i.e., almost all LOINC terms are not AOE observations).
AskAtOrderEntry Allowed values:

True

{LOINC #}

Ask at order entry terms are additional observation terms that may be included with an instance of an order. A LOINC order term may be associated with one or more ask at order entry sets.

The example query shown here will return all of the LOINC terms with which the ask at order entry panel 80399-9 are associated:

AskAtOrderEntry:80399-9

To see the complete list of LOINC codes that are linked to an Ask at Order Entry set of any type, use this query:

AskAtOrderEntry:True

AssociatedObservations Allowed values:

True

{LOINC #}

Associated observations are additional results that may be reported with a primary result. For example, the laboratory may report the volume of a urine specimen along with the primary urine analyte results. We also use the associated observations mechanism in LOINC to specify the sections and entries from HL7 Clinical Document Architecture (CDA) implementation guides that can be reported with certain LOINC document codes. This field can be used to find all of the LOINC terms have associated observation term(s) assigned to them, or to find terms that are linked to a specific associated observation term.

The example query shown here will return all of the LOINC terms that are associated with the term 72225-6, which contains all of the recommended C-CDA R1.1 sections for a Progress Note:

AssociatedObservations:72225-6

To see the complete list of LOINC codes to which associated observations are linked, use this query:

AssociatedObservations:True

AttachmentUnitsRequired Allowed values:

Y

N

Y/N field indicating whether or not a LOINC code is an attachment that requires units. To find all the LOINC codes containing chicken that are attachments that require units use the query:

chicken AttachmentUnitsRequired:y

ChangeReasonPublic This field provides detailed explanation about changes made to the term over time, including those made to the primary Parts, Answer list, etc. To search for all LOINC codes containing the word Mucus and the phrase "specimen changed" in this field, use the query:

mucus ChangeReasonPublic:"specimen changed"

ChngType This field is used to limit a search using the value of the LOINC CHNG_TYPE field. The values in this field are fully documented in the LOINC Users' Guide and are reproduced here for you convenience.
  • DEL = delete (deprecate)
  • ADD = add
  • NAM = change to Component
  • MAJ = change to one of the six major parts other than the Component (i.e., Property, Time, System, Scale, or Method)
  • MIN = change to field other than name
  • UND = undelete
To search for all the LOINC codes containing the word Glucose that have not been modified since they were first released, and therefore will still have a CHNG_TYPE of ADD, use the query:

glucose chngtype:ADD

ClassHierarchy
ComponentHierarchy
MethodHierarchy
MultiAxialHierarchy
SystemHierarchy
Hierarchy. This field contains the path enumeration to a category or name in the hierarchy. Restricting on the hierarchy by manually typing in a value requires extensive knowledge of the database and is therefore not recommended. See the "LOINC Hierarchies" section of the "Mapping" chapter in the RELMA Users' Manual for information on how to enforce a hierarchy restriction from the user-friendly hierarchy restriction screen.
CommonOrder Allowed values:

True

False

Indicates whether or not a LOINC code is one of the S&I Framework's LOINC order set. To search for all the LOINC codes containing acetone that are a common test use the query:

acetone CommonOrder:true

CommonLabResult Allowed values:

True

False

Indicates whether or not a LOINC code is one of the "LOINC Top 2,000+" result codes. To search for all the LOINC codes containing acetone that are in the Top 2000+ use the query:

acetone CommonLabResult:true

ComponentWordCount Number of words in the Component field. To search for all the LOINC codes containing cancer with 3 words in the Component field use the query:

cancer ComponentWordCount:3

CoreComponent This field is used to search for the "core component" of the LOINC term. The Core Component is the portion of the Component that remains after all other parts, including the suffix, challenge, and divisor, are parsed. For example, the core component for Chlamydia trachomatis Ab.IgA is Chlamydia trachomatis. To search for all LOINC codes with core compnent of acyclovir, use the query:

CoreComponent:acyclovir

CorePlaybook Limits searches to LOINC terms that are part of the RadLex core playbook. To see all of the terms in the RadLex core playbook, use the query:

CorePlaybook:true

Description Description. Use this field to search the LOINC description and other reference information fields. Example query:

Description:“isoleucine catabolism”

DocSection Allowed values:

Both

Document

Section

Document section type. To search for all the LOINC codes containing medication that are used for full documents use the query:

medication DocSection:document

To search for all the LOINC codes containing medication that are used for document sections use the query:

medication DocSection:section

ExUCUMunits Example UCUM units. To search for all the LOINC codes containing glucose that have ug/dl in the example UCUM units field use the query:

glucose ExUCUMunits:ug/dl

ExUnits Example units. To search for all the LOINC codes containing streptococcus that also contain titer anywhere in the example units field use the query:

streptococcus ExUnits:titer

Formula Contains the formula in human readable form, for calculating the value of any measure that is based on an algebraic or other formula, except those for which the component expresses the formula. So Sodium/Creatinine does not need a formula, but Free T3 index does. To find all LOINC codes that contain the word "hours" in their formula field, use the query:

Formula:hours

HL7AttachmentStructure Allowed values:

IGexists

NoIGexists

This field can be used to restrict search results to find LOINC codes that have clinically-relevant HL7 implementation guides that use the U.S. Realm Header (using IGexists) or those that are approved by the HL7 Attachments WG for transmission using the C-CDA Unstructured Document template. Example query:

cancer HL7AttachmentStructure:IGexists

HL7FieldSubId The field is valued with the pre-defined HL7 v2.x field that should be used to represent the result associated with this LOINC term if the data is being transmitted using HL7 v2.x messages. For most terms, this field will be null, meaning that the result should be sent in an OBX segment with the LOINC code in OBX-3 and result in OBX-5. To find LOINC codes whose values would be transmitted in the PID-8 field use the query:

HL7FieldSubId:PID-8

Honorary Allowed values:

True

False

Honorary LOINC terms have been created to celebrate the contributions of an individual. To search for honorary LOINC terms use the query:

Honorary:true

*Although a value of False is allowed, a search for terms that are not honorary terms would not be particularly useful because only a few LOINC terms are designated as honorary (i.e., almost all LOINC terms are not honorary terms).
Internal lab use terms Allowed values:

True

False

These are LOINC terms that are primarily used for internal lab reporting. To search for internal lab use terms use the query:

InternalLabUse:True

To exclude internal lab use terms from your search results use the query:

InternalLabUse:False

LabTest Allowed values:

True

False

Indicates whether or not a LOINC code is a lab test (i.e., Class type 1). To search for all the LOINC codes containing aortic that are a lab test use the query:

aortic LabTest:true

The above query will return the same result as:

aortic Type:1

LForms Allowed values:

True

False

This field indicates whether or not the LOINC term is available for viewing in the LForms data widget tool. To search for these terms use the query:

LForms:True

Limited use lab orders These are LOINC terms that were created ONLY for indistinct lab ordering (in response to Canada Health Infoway). To search for these terms use the query:

LimitedUseLabOrders:true

To exclude limited use lab orders terms from your search results use the query:

LimitedUseLabOrders:False

LongName To search for all the LOINC codes containing glucose that also contain [presence] anywhere in the long common name field use the following query. Note that [ and ] are special characters that are part of the query syntax and must be escaped with the \ character so they are treated as data in the search.

glucose LongName:\[presence\]

MapToLOINC The LOINC code to be used as a replacement for deprecated or discouraged LOINC codes. To search for all the LOINC codes containing "protein" that are mapped to LOINC code "2885-2" use the query:

protein MapToLOINC:2885-2

MassProperty Allowed values:

True

False

This field will contain true if the property of the LOINC code is a mass concentration or if it is unknown whether the property of the LOINC code is a mass concentration or a substance concentration. To search for all the LOINC codes containing calcium whose LOINC property is not defined as a substance concentration use the query:

calcium MassProperty:true

Methodless Allowed values:

True

False

Indicates whether or not a LOINC code contains a value in the Method field. To search for all the LOINC codes containing amikacin that do not contain a Method use the query:

amikacin Methodless:true

NonroutineChallenge Allowed values:

True

False

Indicates whether or not a LOINC code is considered a non-routine challenge test. To search for all glucose terms with non-routine challenges use the query:

glucose nonroutinechallenge:true

More practically, you probably want to hide the non-routine terms. This query will return the glucose terms that are not tagged as being non-routine:

glucose nonroutinechallenge:false

OrderObs Allowed values:

Both

Observation

Order

Subset

To search for all the LOINC codes containing glucose that can be used an an order or an observation use the query:

glucose OrderObs:both

OrderRank This field has been deprecated. Please see the UniversalLabOrders field.
OtherCopyright External copyright. To search for all the LOINC codes containing feeling with material that is copyrighted by Pfizer use the query:

feeling OtherCopyright:Pfizer

PanelType Allowed values:

Panel

Convenience

Organizer

LOINC panel classification as a Panel, a Convenience Group, or an Organizer. To search for all the LOINC panel codes classified as a "Convenience Group" use the query:

paneltype:Convenience

See the LOINC Users' Guide for the complete list of panel types and their definitions.
Pharma Allowed values:

True

False

Indicates whether or not the codes were created for a special Pharma use case and have a property that covers both mass and substance. To search for all the LOINC codes containing calcium whose property covers both mass and substance use the query:

calcium Pharma:True

Punctuation This field contains a text version of the non-alphanumeric characters that exist in the 6 core fields of the LOINC name. For example, if you want to only see LOINC terms that contain a "+" character, you would use the following query:

Punctuation:plus

Supported values:
  • ampersand
  • asterisk
  • brace
  • caret
  • colon
  • equal
  • greaterthan
  • hyphen
  • lessthan
  • parenthesis
  • period
  • percent
  • plus
  • semicolon
  • slash
Public health Allowed values:

True

False

These are LOINC terms that are designated primarily for use in the world of public health. To search for public health LOINC terms use the query:

publichealth:true

Rank The position of the LOINC code in the list of the "LOINC Top 2,000+" result codes. This field originally contained values of 1 through approximately 2,000 where 1 represents the most common test. In 2016 we added some LOINC terms to the top 2,000 and assigned them a rank of 3,000 in order to distinguish them from the original set. To search for the LOINC code that is ranked as the 5th most common test use the query:

Rank:5

To search for the LOINC codes that were added to the list in 2016 use the query:

Rank:3000

RelatedCodes This field contains Core Concepts and Synonyms. The table below lists code systems and their descriptions as of RELMA version 6.14 along with search examples for each code system. This search looks for related codes and their concept names and returns LOINC codes that are linked to those related codes.

For example, to find LOINC codes containing congenital that are linked to a related code containing the text heart, use this query:

congenital relatedcodes:heart

Code System Description Example Search
IEEE_CFCODE10_NUM ISO/IEEE 11073 MDC numeric code relatedcodes:131844
IEEE_REFID_TXT ISO/IEEE 11073 Medical Device Communications (MDC) relatedcodes:MDC_BLD_PULS_RATE_INV
NAACCR_ID NAACCR item # relatedcodes:2880
NINDS NINDS Common data elements (CDEs) relatedcodes:C13072
RadLex Radlex radiology codes relatedcodes:rpid455

SIRank The position of the LOINC code in the list of the common 2,000+ tests performed by hospitals that are reported using SI units of measure. This field originally contained values of 1 through approximately 2,000 where 1 represents the most common test. In 2016 we added some LOINC terms to the top 2,000 and assigned them a rank of 3,000 in order to distinguish them from the original set. To search for the LOINC code that is ranked as the 5th most common test use the query:

SIRank:5

To search for the LOINC codes that were added to the list in 2016 use the query:

SIRank:3000

ShortName To search for all the LOINC codes containing chemotherapy that also contain Rx anywhere in the short name field use the query:

chemotherapy ShortName:Rx

Species To search for all the LOINC codes containing parainfluenza that also contain a species of k9 use the query:

parainfluenza Species:k9

Status Allowed values:

Active

Trial

Discouraged

Deprecated

To search for all the LOINC codes containing bacteria that are deprecated use the query:

bacteria Status:deprecated

StatusReason Allowed values:

Duplicate

Erroneous

Ambiguous

Gives the reason a term was deprecated, if known. Otherwise, it contains NULL. To search for all the LOINC codes containing bacteria that are deprecated because a duplicate term exists, use the query:

bacteria Status:deprecated StatusReason:duplicate

StatusText This field contains the free text reason for the current STATUS. This field is optional, therefore it may or may not contain text, and because it is free text, it may not contain the exact text you are searching for. To search for all the LOINC codes that are deprecated because they were created in error and use the phrase "created in error" in the Status text field, use the query:

statustext:"created in error"

SubmittedUnits To search for all the LOINC codes containing the phrase carbon dioxide that also contain mm in the submitted units field use the query:

"carbon dioxide" SubmittedUnits:mm

SubstanceProperty Allowed values:

True

False

This field will contain true if the property of the LOINC code is a substance concentration or if it is unknown whether the property of the LOINC code is a mass concentration or a substance concentration. To search for all the LOINC codes containing calcium whose LOINC property is not defined as a mass concentration use the query:

calcium SubstanceProperty:true

SuperSystem The super system is the text to the right of the "^" in the system field. To search for all the LOINC codes with a supersystem of fetus use the query:

supersystem:fetus

This query will return all terms that have a super system

supersystem:true

SurveyQuestionSource To search for all the LOINC codes containing bowel that also contain Omaha anywhere in the survey question source use the query:

bowel SurveyQuestionSource:omaha

SurveyQuestionText To search for all the LOINC codes containing pain that also contain HIV anywhere in the survey question text use the query:

pain SurveyQuestionText:HIV

TimeModifier The time modifier is the text to the right of the "^" in the TIME_ASPCT field. The following query will return all terms with time modifier of mean:

TimeModifier:mean

This query will return all terms that have a time modifier

TimeModifier:true

Type Allowed values:

1

2

3

4

Numeric representation of the class type. To search for all the LOINC codes containing glucose with a class type of 2 use the query:

glucose Type:2

See the LOINC Users' Guide for definitions of each class type.
TypeName Allowed values:

Lab

Clinical

Attachment

Survey

String representation of the class type. To search for all the LOINC codes containing glucose with a class type of clinical use the query:

glucose TypeName:clinical

UnitsAndRange To search for all the LOINC codes containing oxygen that also contain mm anywhere in the units and range field use the query:

oxygen UnitsAndRange:mm

UniversalLabOrders The Universal Lab Order Codes Value Set from LOINC is a collection of the most frequent lab orders.

universallaborders:true

ValidHL7AttachmentRequest Allowed values:

Y

N

A value of Y in this field indicates that this LOINC code can be sent by a payer as part of an HL7 attachment request for additional information. To find all LOINC codes that can be sent by a payer as part of an HL7 attachment request, type:

ValidHL7AttachmentRequest:Y

VersionLastChanged The LOINC version number in which this LOINC code was modified. To search for all the LOINC codes containing adenovirus that were last updated in version 2.56 use the query:

adenovirus VersionLastChanged:2.56

Veterinary These are LOINC Terms that are primarily used in the field of veterinary medicine. To search for veterinary terms use the query:

Veterinary:true

To exclude veterinary terms from your search results use the query:

-Veterinary:true

For basic field names see the Basic LOINC Field Names section.