Sample Override Filter Field Formulas for the Clinical Data Model

Use these formulas as is, or as a starting point to create your own formulas, to filter records in the Clinical Data Model.

Object Display Conditions Formula
Person Name
  • Must not be the patient’s primary name
IF( NOT( IsPrimary ) , true, false)
Person Language
  • No conditions
true
Identifier
  • No conditions
true
Health Condition
  • Status must be Active or Relapse
IF( OR(( ISPICKVAL( ConditionStatus , "Active") ),( ISPICKVAL( ConditionStatus , "Relapse") )) , true, false)
Allergy Intolerance
  • Status must be Active
IF( ISPICKVAL( Status , "Active") , true, false)
Medication Statement
  • Status must not be Not-taken, Unknown, or Entered-in-error
  • Must be from the last two years
IF(( AND(( NOT( OR(( ISPICKVAL( Status , "Not-taken") ),( ISPICKVAL( Status , "Unknown") ),( ISPICKVAL( Status , "Entered-in-error") )) ) ),((( YEAR( TODAY() ) ) - ( YEAR( DATEVALUE( StartDateTime ) ) )) <= 2)) ), true, false)
Patient Immunization
  • Status must be Completed
IF( ISPICKVAL( Status , "Completed") , true, false)
Clinical Encounter
  • Must have happened in the last two years
IF((( YEAR( TODAY() ) - YEAR( DATEVALUE( StartDate ) ) ) <= 2), true, false)
Clinical Service Request
  • Status must not be Entered-in-Error
  • Must have happened in the last two years
IF(( AND(( NOT( ISPICKVAL( Status , "Entered-in-Error") ) ),((( YEAR( TODAY() ) )-( YEAR( DATEVALUE( StartDate ) ) )) <= 2)) ), true, false)
Patient Medical Procedure
  • Status must not be Entered in error
  • Must have happened in the last two years
IF(( AND(( NOT( ISPICKVAL( Status , "Entered in error") ) ),((( YEAR( TODAY() ) )-( YEAR( DATEVALUE( StartDate ) ) )) <= 2)) ), true, false)
Clinical Observation
  • Must have happened in the last two years
IF((( YEAR( TODAY() ) - YEAR( DATEVALUE( EffectiveDateTime ) ) ) <= 2), true, false)
Diagnostic Summary
  • Usage type must be Diagnostic Summary
  • Status must not be Entered-in-error
  • Must be issued in the last two years
IF(( AND(( NOT( ISPICKVAL( Status , "Entered-in-error") ) ),( ISPICKVAL( UsageType , "Diagnostic Summary") ),((( YEAR( TODAY() ) )-( YEAR( DATEVALUE( IssuedDateTime ) ) )) <= 2)) ), true, false)
Clinical Alert
  • Status must not be Entered-in-Error
  • Must be from the last two years
IF(( AND(( NOT( ISPICKVAL( Status , "Entered-in-Error") ) ),((( YEAR( TODAY() ) )-( YEAR( DATEVALUE( StartDate ) ) )) <= 2)) ), true, false)