improved

August 8, 2023

📰 Clinical notes are now available in Data Marts. Data mart users can now analyze the narratives from sections of CDA documents (the standard format for clinical document exchange) through the text element of the DocumentReference resource type.

For example, suppose you want to identify which patients in your population have had clinical notes that contain mentions of an A1C test. The query below will retrieve an ordered result set.

select
    id,
    created_at,
    document_source,
    type,
    category,
    description,
    universal_patient_identifier,
    document_date,
    text_div,
    text_status,
    context_period_start,
    context_period_end
from documentreference
where lower(text_div) like '%a1c%'
order by universal_patient_identifier, created_at

Known Issues

The clinical notes parsing has a few known issues:

  • The text element often contains HTML, such as
    <div xmlns="http://www.w3.org/1999/xhtml"><ul><li><span>Formatting of this note might be different from the original.</span><br />
  • Clinical notes from CDA document sections are available from May 2023 onwards.