Value sets are FHIR compliant compositions of Codeable Concepts based on some attribute. Value-sets are used to create unions of subsets which can then be used in Questionnaires to select valid options. Value-sets internally are defined with rules around composing a set of values from multiple or single code systems.
Value-sets are not dumped as individual codes when created, instead they are stored as a composition object and the composition items are fetched real time from different terminology servers as required. The composition logic can be passed on to the implementing terminology server to be applied.
FHIR defines rules around how a value-set composition can be built. These rules may not be supported in all terminology servers. When defining a system in care, we should also take care of defining what kind of filters can be applied on the system. Care’s default system will support all the requirements of FHIR.
{
"url": "str", // Unique id of the valueset, if this valueset is declared in care, the globally unique id would be <http://care-instance/uri/valueset/id>
"id": "str", // Unique id
"name": "str", // Unique Name
"title": "str", // Title
"status": "options", // draft|active|retired|unknown Dervied from <https://build.fhir.org/valueset-publication-status.html>
"description": "freetext", // Free Text Description
"compose": {
"include": [
{
"system": "str", // Unique id/uri of the system
"version": "str", // Version of the system, can be ignored
"concept": {
"code": "str", // In case you want to specify only one concept, you can specify the code here
"display": "str" // Display value for the given code, this is used incase you want to rename the code as something else.
}
"filter" : {
"property" : "str", // This is the property the filer is created on, A system defenition will have the possible properties you can query on
"op" : "option", // This is the operation applied on the property -- Required Binding to <https://hl7.org/fhir/valueset-filter-operator.html>
"value" : "str" // Value used for the operation
}
}
],
"exclude": [{}] // Same schema as includes
},
"meta" : [
{
"code" : {}, // Code for which meta is stored.
"metadata" : {} // metadata for the code.
}
]
}
** Expansion is a concept where all the codes that are the result of the value-set is added to the value-set explicitly. This feature will not be built in Care, instead we will build API’s that can query the data real-time.
A valueset can also provide metadata on some of its codes, this metadata can be used to add more context, like scores for Glasgow coma score or other such instances. The metadata will be converted into extensions in the FHIR spec for an observation. applicable metadata will be stored along with an observation.
Each System defined in care would also define what parameters are queryable and how the query should be executed, the system can write its own implementation of the search/query functionality. This means that internally the system could query a terminology server and serve its results instead of storing data in the plug.
Care will implement an in-memory or database supported query on limited fields.