Skip to content

Instantly share code, notes, and snippets.

@dylancwood
Created November 10, 2015 21:00
Show Gist options
  • Save dylancwood/feb2967372429ca26a73 to your computer and use it in GitHub Desktop.
Save dylancwood/feb2967372429ca26a73 to your computer and use it in GitHub Desktop.

Here's how bad channel data is stored in the COINS DB: Each scan session is stored as a row in the mrs_scan_sessions table. Multiple scan series may be associated with each scan, and are stored in the mrs_series table. Scan metadata categories like bad channels are stored in the mrs_scan_data_types table. Series are associated with many metadata categories the mrs_series_data table (which contains a series_id, a scan_data_type_id and a value).

Exporting this data through our more modern API would result in the following format:

[
    {
        "scanId": 1234,
        "series": [
            {
                "seriesId": 2345,
                "seriesData": [
                    {
                        "dataTypeId": 7,
                        "dataType": {
                            "label": "bad channel"
                        },
                        "value": 21
                    }
                ]
            }
        ],
        "ursi": M87100000,
        "scanDate": "01/11/1993"
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment