Age: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
(m)
m (clean-up)
Line 18: Line 18:


=== Function to calculate Age ===
=== Function to calculate Age ===
*Both formula yields the same AGE values.
====ACCESS====
====ACCESS====
*CCMDB_Age = excel.WorksheetFunction.Floor(CInt(DateDiff("yyyy", DOB, Adm)) + Int(Format(Adm, "mmdd") < Format(DOB, "mmdd")), 1)
*CCMDB_Age = excel.WorksheetFunction.Floor(CInt(DateDiff("yyyy", DOB, Adm)) + Int(Format(Adm, "mmdd") < Format(DOB, "mmdd")), 1)
**where Birth = [[Date of Birth]] and Adm = ([[Accept DtTm]] if available, [[Arrive DtTm]] otherwise)
**where Birth = [[Date of Birth]] and Adm = ([[Accept DtTm]] if available, [[Arrive DtTm]] otherwise)
{{discussion}}  
{{discussion}}  
===== query ages =====
* this is calculated as part of queries ''ages'' and ''''; can we eliminate query "ages" or is it actually used somewhere? Ttenbergen 16:20, 2016 July 4 (CDT)
* this is calculated as part of queries ''ages'' and ''''; can we eliminate query "ages" or is it actually used somewhere? Ttenbergen 16:20, 2016 July 4 (CDT)
** I use the age field from the created variables.  but if I need only the age and I have called the L_LOG_PHI, I used the formula instead of calling another query. 
*** '''I will get rid of that query when I get to it then.''' Ttenbergen 15:04, 2016 September 19 (CDT)


====SAS ====
====SAS ====
{{discussion}}
*Age=floor((intck('month',Birth,R_Adm) - (day(R_Adm) < day(Birth))) / 12)  
* Julie, do you still do your own calculation for this in SAS or do you now use the output of query ''ages'' that has been around for a long time? It would likely be best to only calculate this in one spot, and right now you'd have to update your SAS to use the new fields, so this might be a good time to start using the query. If you are up to it then please delete the SAS part when done. Ttenbergen 16:07, 2016 July 4 (CDT)
**where Birth = Date of Birth and R_Adm = (Accept DtTm if available, Arrive DtTm otherwise)
**I haven't used the query ages. I use the age field from the created variables.  but if I need only the age and I have called the L_LOG_PHI, I used the formula instead of calling another query.  I suggest we just keep the SAS formula in case someone will ask how we are computing age in SAS because this formula is just one of the ways to calculate age in SAS. 


**Age=floor((intck('month',Birth,R_Adm) - (day(R_Adm) < day(Birth))) / 12)
Decided to keep this for now for cross-checking even though it duplicates the calculation in Access.
***where  Birth = Date of Birth and R_Adm = (Accept DtTm if available, Arrive DtTm otherwise)
*Both formula yields the same AGE values.


== Related fields ==
== Related fields ==

Revision as of 15:04, 2016 September 19

Data Element (edit)
Field Name: Age
CCMDB Label: not stated
CCMDB tab: not stated
Table: Created_Variables
Data type: integer
Length: not stated
Program: Med and CC
Created/Raw: Created
Start Date: 1988-07-11
End Date: 2300-01-01
Sort Index: 999

Age is the number of years between Date of Birth and the last birthday prior to or on (Accept DtTm if available, Arrive DtTm otherwise).

  • SMW

Legacy implementation right in the table

  • Cargo


  • Categories
  • Forms


Age is part of the APACHE II score for Critical Care and ALERT scale used in Medicine.

Function to calculate Age

  • Both formula yields the same AGE values.

ACCESS

  • CCMDB_Age = excel.WorksheetFunction.Floor(CInt(DateDiff("yyyy", DOB, Adm)) + Int(Format(Adm, "mmdd") < Format(DOB, "mmdd")), 1)

Template:Discussion

query ages
  • this is calculated as part of queries ages and '; can we eliminate query "ages" or is it actually used somewhere? Ttenbergen 16:20, 2016 July 4 (CDT)
    • I use the age field from the created variables. but if I need only the age and I have called the L_LOG_PHI, I used the formula instead of calling another query.
      • I will get rid of that query when I get to it then. Ttenbergen 15:04, 2016 September 19 (CDT)

SAS

  • Age=floor((intck('month',Birth,R_Adm) - (day(R_Adm) < day(Birth))) / 12)
    • where Birth = Date of Birth and R_Adm = (Accept DtTm if available, Arrive DtTm otherwise)

Decided to keep this for now for cross-checking even though it duplicates the calculation in Access.

Related fields