Skip to main content
Fig. 1 | BMC Medical Informatics and Decision Making

Fig. 1

From: Development and assessment of PharmaCheck: an electronic screening tool for the prevention of twenty major adverse drug events

Fig. 1

Example of an aggregation pipeline. This three-stages aggregation query describes how EHR are filtered to identify patients with at least one apixaban prescription and an estimated glomerular renal function (GFR) lower than 30 mL/min: First Stage: The $match stage filters the prescription database to identify the medication by its anatomical therapeutic chemical (atc) code and its status. Only prescriptions that concern apixaban (atc equal to "B01AF02″) and that have be signed and are still active (status equal to”CHECKED”) pass on to the next stage; Second Stage: The $graphlookup stage lookups laboratory values with a publication date of less than 30 days (step not shown in the example) for the patients identified with the first stage. Thus, lookup stage is performed in the list of all recent published laboratory data concerning patient(s) whose identifier ("patient_id") has been isolated in the first step and restricted to analysis with a dosage_label equal to “GFR” and a value lower than or equal to 30 (mL/min); Third stage: The $project stage enables the construction of the table of aggregated results with patient identifier (patient_id), medical order description (treatment), and eGFR value (GFR (ml/min))

Back to article page