Closed jackwasey closed 6 years ago
complicated by some neonatal conditions, for example, being classified as "originating" in neonatal period, thus not allowing validation.
The HCC risk model SAS code has the following conditions based on age and sex. Setting CC to -1.0 means invalid, whereas setting to positive numbers indicates validity. This set would be a good starting point. I'll have to review them individually, but if they are truly always invalid, I would return FALSE (and have an option to either warn or ignore these discrepancies).
/* Hemophilia for women_/
IF &SEX="2" AND &ICD9 IN ("2860", "2861") THEN CC="48";
ELSE
/emphysema/chronic bronchitis /
IF &AGE < 18 AND &ICD9 IN ("4910", "4911", "49120", "49121", "49122",
"4918", "4919", "4920", "4928", "496",
"5181", "5182") THEN CC="112";
ELSE
/_chronic obstructive asthma */
IF &AGE < 18 AND &ICD9 IN ("49320", "49321", "49322")
THEN CC="-1.0";
Medicare puts out a list of code edits for validation that includes age and gender restrictions. I've converted it to a csv. https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/AcuteInpatientPPS/Downloads/FY_14_Definition_of-Medicare_Code_Edits_V_31_Manual.pdf
On Thu, Mar 19, 2015 at 12:22 PM Jack Wasey notifications@github.com wrote:
The HCC risk model SAS code has the following conditions based on age and sex. Setting CC to -1.0 means invalid, whereas setting to positive numbers indicates validity. This set would be a good starting point. I'll have to review them individually, but if they are truly always invalid, I would return FALSE (and have an option to either warn or ignore these discrepancies).
/* Hemophilia for women
_/ IF &SEX="2" AND &ICD9 IN ("2860", "2861") THEN CC="48"; ELSE /_emphysema/chronic bronchitis
_/ IF &AGE < 18 AND &ICD9 IN ("4910", "4911", "49120", "49121", "49122", "4918", "4919", "4920", "4928", "496", "5181", "5182") THEN CC="112"; ELSE /_chronic obstructive asthma */ IF &AGE < 18 AND &ICD9 IN ("49320", "49321", "49322") THEN CC="-1.0";
— Reply to this email directly or view it on GitHub https://github.com/jackwasey/icd9/issues/30#issuecomment-83649603.
That's great, thanks. Even greater would be a pull request with updates to the validity checking functions, otherwise you might want to send me or pull-request the CSV, and I'll get round to it some time.
I'd still be happy to include a pull request for this, but as there is no apparent demand, closing now.
neonatal, preterm, and infant only codes could be validated against age. If age only available in years, some validation could still be done.
geriatric only codes could also be checked, although less clear what age to cut-off. Validation could at least warn, not fail, for apparent errors.