Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data mapping. #6

Open
anthonytw opened this issue Jun 4, 2020 · 0 comments
Open

Add data mapping. #6

anthonytw opened this issue Jun 4, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@anthonytw
Copy link
Member

anthonytw commented Jun 4, 2020

Add data mapping / proxy datasets, similar to CCDEF, maybe adding additional flexibility.

/standard_clinical_numerics/.meta
{
    "columns": {},
    "proxies": {
        // Some datasets only have a single source, so we can use a direct mapping. This is
        // equivalent to what was proposed, e.g., pick your favorite signal for a given vital.
        // This can, of course, be used for all vitals if you wish. The major drawback is when
        // the source disappears you lose the vital, even if it's available from another source.
        "SpO2": {
            "type": "direct",
            "dataset": "/numerics/Pleth.SpO2"
        }
        // Some signals might have multiple sources, and maybe the right action is to choose based
        // on a priority list (if first is available, pick that, else, move down the list). This
        // allows use of a favored channel, but also falling back on other sources at times when
        // the preferred source is unavailable.
        "SysBP": {
            "type": "ranked",
            "datasets": [
                "/numerics/ART.Sys",
                "/numerics/CNAP.Sys",
                "/numerics/NBP.Sys"
            ]
        }
        // We might also just want to return all data points for a specific signal and let the user
        // do what they want with it, e.g., take the median.
        "HR": {
            "type": "all",
            "datasets": [
                "/numerics/ART.HR",
                "/numerics/ECG.HR",
                "/numerics/Pleth.HR"
            ]
        }
    }
}

And it could be used just like any other dataset:

// Returns only SpO2 from the Pleth, since it is a direct proxy. SpO2 available from other sources
// will be ignored.
spo2 = my_file['/standard_clinical_numerics'][start_time:end_time, 'SpO2']
// Returns the highest-priority data available for SysBP in the time range given, which could include
// data from multiple sources if a higher-priority source drops off or is added on.
sys = my_file['/standard_clinical_numerics'][start_time:end_time, 'SysBP']
// Returns all available data for HR in the time range given, because the proxy type is "all".
hr = my_file['/standard_clinical_numerics'][start_time:end_time, 'HR']
@anthonytw anthonytw added the enhancement New feature or request label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant