Sleep Apnea

Synopsis

This query searches mentions of Sleep Apnea in patient records by querying for a set of related SNOMED concepts.

Processing Requirements

This query assumes that at least the following emtellipro-db-client processing options were enabled:

  • --feature snomed-ontology
  • --store-sections-and-sentences

For this query, Clinical notes were processed with the following document type:

  • --category Clinical
  • --subcategory generic (or more specific report types such as Discharge Summary, SOAP Note, CCD as applicable)

Clinical Context

Sleep apnea is a disorder characterized by intermittent periods of apnea (arrest of respiration) during sleep. However, in day-to-day clinical practice, this condition can be referred to by multiple different terms such as obstructive sleep apnea, sleep apnea, or it may be written that the patient has PND or paroxysmal nocturnal dyspnea, or there may be no mention of sleep apnea and it may just be written that the patient uses a continuous positive airway pressure (CPAP) machine at night. Thus, we must look for multiple concepts related to the same (or similar) clinical entities.

  • 78275009|Obstructive sleep apnea syndrome (disorder)|
  • 73430006|Sleep apnea (disorder)|
  • 55442000|Paroxysmal nocturnal dyspnea (finding)|
  • 62744007|Orthopnea (finding)|
  • 47545007|Continuous positive airway pressure ventilation treatment (regime/therapy)|

This type of query can easily be modified to retrieve occurrences of other clinical entities by identifying a subset of associated concepts to use in place of the list of SNOMED concept IDs used in this sample query.

SQL query

-- Multi-concept query for sleep apnea without experiencer relation
SELECT c.concept_id As concept_id,
c.description AS concept_description,
fe.section_name,
fe.text AS annotated_text,
sl.text AS sentence
FROM entity e
JOIN foundentity fe ON fe.id = e.entity_id AND e.type_ = 'found' -- IMPORTANT: e.type_ = 'found' is required
JOIN foundentityconcept fec ON fe.id = fec.found_entity_id
JOIN concept c ON c.concept_id = fec.concept_id AND c.ontology = fec.concept_ontology
JOIN foundentitylocation fel ON fe.id = fel.found_entity_id
JOIN location l
ON fel.location_id = l.id AND l.type_ = 'sentence' -- IMPORTANT: check that location type is 'sentence'
JOIN sentencelocation sl ON sl.id = l.location_id
WHERE c.ontology = 'snomed'
AND c.concept_id IN ('78275009', '73430006', '55442000', '62744007', '47545007') -- REPLACE: with target concepts
AND fe.polarity = 'asserted'
AND fe.uncertainty = 'certain';
concept_idconcept_descriptionsection_nameannotated_textsentence
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)SUBJECTIVECPAPAs noted, the patient is not snoring on CPAP.
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)ASSESSMENTCPAPI recommend he continues CPAP indefinitely.
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)ASSESSMENTCPAPIf this continues, we can consider a new sleep study to determine whether he still needs CPAP.
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)SUBJECTIVECPAPMr. Sidney is a 50-year-old man who returns to discuss his still moderate-to- sleep apnea, and to review his response to CPAP.
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)SUBJECTIVECPAPHe was found to have moderate-to-severe sleep apnea, and was treated with nasal CPAP for the past few months.
47545007Continuous positive airway pressure ventilation treatment (regime/therapy)SUBJECTIVECPAPHe estimates that he uses the CPAP approximately 4-6 nights per week, and on occasion takes it off and does not replace the mask when he awakens spontaneously in the middle of the night.
73430006Sleep apnea (disorder)SUBJECTIVEsleep apneaMr. Sidney is a 50-year-old man who returns to discuss his still moderate-to- sleep apnea, and to review his response to CPAP.
73430006Sleep apnea (disorder)SUBJECTIVEsleep apneaHe was found to have moderate-to-severe sleep apnea, and was treated with nasal CPAP for the past few months.
73430006Sleep apnea (disorder)ASSESSMENTsleep apneaModerate-to-severe sleep apnea.
78275009Obstructive sleep apnea syndrome (disorder)PAST MEDICAL HISTORYOSAOSA

Next steps

The list of sleep apnea and related mentions can be further filtered to return only those that pertain to the patient. See Sleep Apnea Experienced by Patients.