Comments (2)
Thinking about this again in terms of diagnostic and procedure codes, and for ICD-10, annual and regional variations.
There may be conflict between an ideal structure of the data, and maintaining backward compatibility and simplicity. It might be possible simply to add attributes to data.frames and matrices.
ICD codes: version (9-CM), region (USA), year (2014), short codes (true)
- possibly whether codes are diagnostic, procedure, or any other designation. At present, I don't see a conflict between any ICD-9, 10 procedure or diagnostic codes, so I won't include this right now.
Comorbidity map:
- same characteristics available in a list of ICD codes (since this is just a list of vectors of these). All should share the same attributes.
ICD data frame: a data frame with additional attributes identifying the structure of the ICD data within
- wide or long format
- if wide, number of diagnosis fields
- if wide, number of procedure code fields
- name of visitId field
- name of ICD diag code field(s), prefix if plural. will assume zero-padded number e.g. ICD_05, and not code for anything else unless use case arises
- name of ICD proc code field(s)
- maybe for long format, could include the max number of diagnosis and/or procedure codes per case (this would allow optimization downstream, as we wouldn't need to keep count, and could pre-allocate the result matrix)
From a user's perspective, I would accept a regular data.frame for any function as I do now, but if the attributes were present, these could be used instead of specifying function arguments every time. some option
s might also be set as defaults by the user for these things. Order of preference would then be:
function arg < attribute < option/default/guess?
Whenever we reply with a data.frame or matrix, we can add attributes we already know about, either via option
, a function argument, or pre-existing attributes in input data. Also, a function icd9SetAttrib could modify a data.frame to include specific attributes, then subsequent function calls wouldn't need to specify the field names, etc, each time, and the correct long or wide version.
The only benefit of using S3 classes over attributes might be that we could create things like print.icd9frame
or summary.icd9ComorbidMatrix
to display our data better, but this can be accomplished with any old function name, but not quite so simply as print(myIcd9thing)
.
It think the attributes approach can be done quite simply, and with 100% backward compatibility. The guess functions would need to guess less. We can message when a guess was made (which would become an attribute)
from icd.
completed in icd10 dev branch
from icd.
Related Issues (20)
- dependency on curl executable should be more obvious HOT 1
- short_code argument to expand_range doesn't work for ICD10 HOT 1
- Extending to ICD-O?
- expand_range errors out on ICD-10 decimal codes
- travis build failing due to qpdf HOT 2
- Add `[.icd9cm_pc` and `[.icd10cm_pc` methods
- cannot install in R 3.6.3 or 3.6.1 HOT 1
- package pulled from CRAN HOT 1
- package no longer available on cran HOT 2
- Confusion over undefined ICD codes HOT 2
- Workaround from icd 10 - global burden of disease
- Charlson score accounting twice for the same diagnosis
- Package is down on CRAN HOT 11
- Fails to download who16? HOT 1
- update ICD-10 AHRQ comorbidities
- unable to keep track of which ICD codes are explainable and which are unexplained
- E-Valued ICD10 Codes Return Incorrect Desc or Character Length 0 within `explain_code()`
- How to download the package to a local file HOT 1
- expand_range doesn't work for certain chapters HOT 1
- Not able to install ICD package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icd.