Skip to content

What is the shared ID for a variable across the ecosystem? #7

@vincenzodomina

Description

@vincenzodomina

Requirements to the variables schema and the reference database

  • I as OpenCures I need a variables table with entries i made manually (public CureDAO ecosystem can read, only I can write)
  • I need to query one specific entry directly through an id (e.g. to render a detail page of this variable)
  • I want to change the content like the name later, but already shared data should still map to it (e.g if slug is changed after name change)
  • Measurements created with this attached variable id should be useable for any stakeholder in this ecosystem

The API response should contain this:

.../api/variables/blood_testosterone ->

// Testosterone
{
    id: 'blood_testosterone',   // used also as api property if needed, snake case
    slug: 'blood-testosterone', // used for urls
    category: 'laboratory',
    ref_loinc_id: '2986-8',
    // With the loinc id there is an assay/measurement method definition attached, would be evtl. needed with other biomarkers e.g. heartrate with ppg sensor or manually including the mean error
    abbreviated_name: 'T',
    name: 'Testosterone',
    description: "This is a custom OpenCures description tailored to the specific feature i use this for",
    unit: 'ng/dL',
    synonyms: ['Testosterone, Total', 'Testosterone, Serum', 'Testosteron ges.', 'Testosteron gesamt'],
    references: ['https://www.labcorp.com/tests/004226/testosterone-total', 'https://www.netdoktor.de/Diagnostik+Behandlungen/Laborwerte/Testosteron-1522.html'],
    ranges: {
        male: {
            norm: {
                0: [0, 0, 5, 5, 495, 495, 2000, 2000],
                1: [0, 0, 3, 3, 32, 32, 2000, 2000],
                7: [0, 0, 3, 3, 32, 32, 2000, 2000],
                8: [0, 0, 2, 2, 882, 882, 2000, 2000],
                18: [0, 0, 2, 2, 882, 882, 2000, 2000],
                19: [0, 0, 280, 280, 800, 800, 2000, 2000],
                20: [0, 0, 132, 132, 906, 906, 2000, 20000],
                60: [0, 0, 132, 132, 906, 906, 2000, 2000],
            }
        },
        female: {
            norm: {
                0: [0, 0, 3, 3, 161, 161, 2000, 2000],
                1: [0, 0, 3, 3, 32, 32, 2000, 2000],
                7: [0, 0, 3, 3, 32, 32, 2000, 2000],
                8: [0, 0, 4, 4, 38, 38, 2000, 2000],
                18: [0, 0, 4, 4, 38, 38, 2000, 2000],
                19: [0, 0, 6, 6, 82, 82, 2000, 2000],
                20: [0, 0, 2, 2, 52, 52, 2000, 2000],
            }
        },
    },

    // And the other already agreed stuff of course, not subject of this discussion
    created_at: "timestamp",
    updated_at: "timestamp",
    version_first_released: "",
    version_last_changed: "",
    // ...
};

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions