title: Hospital Setting. "Flag" a patient if a result has a specific value
body: <p>Coding in SQL Server 2008 </p>
  
  <p>I have a list of patients and associated result values.
  I need to filter patients based on a specific result value (MMRC) being null or not null. Each patient has multiple results, but only one needs to be evaluated for this.</p>
  
  <p>Example:</p>
  
  <pre><code>Patient SMITH 
  Result Value 1
  Result Value 2
  Result Value 3
  MMRC = 2
  
  Patient JONES
  Result Value 1
  Result Value 2
  Result Value 3
  MMRC = NULL
  </code></pre>
  
  <p>I want to "flag" Patient SMITH as "Pulmonary" (MMRC is not null) and Patient JONES as "Cardiac" (MMRC is null) so that I can use that "Flag" as a parameter in my crystal report.</p>