Skip to main content


Home > @medplum/core > IndexedStructureDefinition

IndexedStructureDefinition interface

An IndexedStructureDefinition is a lookup-optimized version of a StructureDefinition.

StructureDefinition resources contain schema information for other resource types. These schemas can be used to automatically generate user interface elements for resources.

However, a StructureDefinition resource is not optimized for realtime lookups. All resource types, sub types, and property definitions are stored in a flat array of ElementDefinition objects. Therefore, to lookup the schema for a property (i.e., "") requires a linear scan of all ElementDefinition objects

A StructureDefinition resource contains information about one or more types. For example, the "Patient" StructureDefinition includes "Patient", "Patient_Contact", "Patient_Communication", and "Patient_Link". This is inefficient.

Instead, we create an indexed version of the StructureDefinition, called IndexedStructureDefinition. In an IndexedStructureDefinition, retrieving a property definition is a hashtable lookup.

The hierarchy is: IndexedStructureDefinition - top level for one resource type TypeSchema - one per resource type and all contained BackboneElements PropertySchema - one per property/field


export interface IndexedStructureDefinition 


typesRecord<string, TypeInfo>