Age: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
m (more qs)
Line 7: Line 7:
*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}}
* 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)


====SAS ====
====SAS ====

Revision as of 16:20, 2016 July 4

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).

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

Function to calculate Age

ACCESS

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

Template:Discussion

  • 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)

SAS

Template:Discussion

  • 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)
    • Age=floor((intck('month',Birth,R_Adm) - (day(R_Adm) < day(Birth))) / 12)
  • Both formula yields the same AGE values.