zen-lang / zen

Library for model driven systems
116 stars 12 forks source link

Value sets #26

Open KGOH opened 2 years ago

KGOH commented 2 years ago

I need to specify that some value may be not just a :enum but some reusable and bigger set of possible values, size of a such value set may reach up to a million values.

Use-case: A key with possible values from ICD-10

diagnosis-concept
{:zen/tags #{zen/schema}
 :value-set {:sym icd10, :keys #{:code :display}} 
 :type zen/map
 :keys {:code {:type zen/string}
        :display {:type zen/string}}}

diagnosis-code
{:zen/tags #{zen/schema}
 :value-set {:sym icd10, :value :code} 
 :type zen/string}

Urgency: high Currently I need to implement this as a zen extension making my zen schemas not shareable