Difference between revisions of "Thirty days mortality"

From ECHSA Congenital Database
Jump to navigationJump to search
(The definition changed, SQL snippet added)
(+Link to patients' filtering)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{terminology-infobox}}
 
{{terminology-infobox}}
  
'''Thirty Days Mortality''' is the fraction of patients that died within 30 days from the date of surgery.
+
30-day mortality is defined '''in regard to a set of patients'''. Some of the reports use operations' properties for filtering operations. However, to calculate the mortality for those operation a set of patients must be determined. Read more about [[filtering patients by operation properties]].
 +
 
 +
== 30-day mortality for given set of patients ==
 +
 
 +
'''Thirty Days Mortality is the fraction of patients that died within 30 days from the date of the first surgery.'''
  
 
For a each patient, thirty days mortality can be ''true'' or ''false''. Condition for ''true'' is:
 
For a each patient, thirty days mortality can be ''true'' or ''false''. Condition for ''true'' is:
  
'''There is an operation for which the difference between date of surgery and date of death is less or equal to 30 days.'''
+
'''The difference between the earliest date of surgery and the date of death is less or equal to 30 days.'''
  
Example of patient history with ''true'':
+
Example of patient history with ''false'':
  
 
  2000-01-01 birth
 
  2000-01-01 birth
Line 14: Line 18:
 
  2000-03-01 death
 
  2000-03-01 death
  
Even though the first (main) operation was more than 30 days before patient's death, there exists a second (possibly trivial) operation after which the patient deceased.
+
Example of patient history with ''true'':
 +
 
 +
2000-01-01 birth
 +
2000-02-10 operation 1
 +
2000-02-12 operation 2
 +
2000-03-01 death
  
 
SQL code snippet for the thirty days mortality:
 
SQL code snippet for the thirty days mortality:
  
  SELECT ...
+
  SELECT
FROM patient AS p
+
    patient_id,
WHERE EXISTS (
+
    CASE
    SELECT TRUE
+
    WHEN
    FROM operation AS o
+
    (
    WHERE p.patient_id = o.patient_id
+
        SELECT min(o1.date_of_surgery)
    AND p.date_of_death - o.date_of_surgery BETWEEN 0 AND 30
+
        FROM operation AS o1
  )
+
        WHERE o1.patient_id = p.patient_id
 +
    ) - p.date_of_birth BETWEEN 0 AND 30
 +
    THEN 1
 +
    WHEN
 +
    (
 +
        SELECT count(*)
 +
        FROM operation AS o1
 +
        WHERE o1.patient_id = p.patient_id
 +
    ) = 0 THEN NULL
 +
    ELSE 0 END
 +
    AS "m30f"
 +
FROM
 +
    patient AS p
 +
  ;
 +
 
 +
== 30-day mortality per procedure ==
 +
 
 +
For every raport that shows per-procedure mortality or [[Basic Score]] related mortality needs a different way of calculating mortality. The [[primary procedure]] must be elected for each patient. See the [[primary procedure election]] for details.
  
 
'''See also'''
 
'''See also'''

Latest revision as of 20:30, 30 March 2006

Terminology
Report parameters
Data

30-day mortality is defined in regard to a set of patients. Some of the reports use operations' properties for filtering operations. However, to calculate the mortality for those operation a set of patients must be determined. Read more about filtering patients by operation properties.

30-day mortality for given set of patients

Thirty Days Mortality is the fraction of patients that died within 30 days from the date of the first surgery.

For a each patient, thirty days mortality can be true or false. Condition for true is:

The difference between the earliest date of surgery and the date of death is less or equal to 30 days.

Example of patient history with false:

2000-01-01 birth
2000-01-15 operation 1
2000-02-12 operation 2
2000-03-01 death

Example of patient history with true:

2000-01-01 birth
2000-02-10 operation 1
2000-02-12 operation 2
2000-03-01 death

SQL code snippet for the thirty days mortality:

SELECT
    patient_id,
    CASE
    WHEN
    (
        SELECT min(o1.date_of_surgery)
        FROM operation AS o1
        WHERE o1.patient_id = p.patient_id
    ) - p.date_of_birth BETWEEN 0 AND 30
    THEN 1
    WHEN
    (
        SELECT count(*)
        FROM operation AS o1
        WHERE o1.patient_id = p.patient_id
    ) = 0 THEN NULL
    ELSE 0 END
    AS "m30f"
FROM
    patient AS p
;

30-day mortality per procedure

For every raport that shows per-procedure mortality or Basic Score related mortality needs a different way of calculating mortality. The primary procedure must be elected for each patient. See the primary procedure election for details.

See also