The resource specifies a set of Concepts included in this code system.
assumes a separate creation of the CodeSystem resource and a set of Concepts composing it. This means that the CodeSystem resource describes only the meta information of the code system: URL, name, publisher, etc. Whereas Concept resources describe the content of the code system and are associated with the code system by the Concept.system attribute with the same value as the CodeSystem.url element.
For FHIR conformance, we allow to create the CodeSystem resource with a list of included concepts. If it contains listed Concepts at the moment of saving a CodeSystem, then Aidbox saves submitted Concepts as separate resources. The CodeSystem resource itself is saved without the concept attribute. This method of the CodeSystem creation may be used for small dictionaries (generally, not more than 100 concepts). In the case when your code system is big, Aidbox strongly recommends creating the CodeSystem resource separately and uploading Concepts in parts.
CRUD
Create
resource can be created as a FHIR resource with embedded concepts. This approach is applicable for those cases when your code system contains a small number of concepts, usually no more than 100.
For example, we will create a CodeSystem for eye color containing Brown, Blue, Green, Hazel, Heterochromia coded concepts.
As you can see, the request returns only CodeSystem meta information (url, status, content....), and does not return concept listed in that request. It is because Aidbox divides CodeSystem to CodeSystem body and contained concepts list, and creates all concepts as independent Concept resources.
And if we get Concept with system = http://code.system/eyes.color, we will receive all concepts for this CodeSystem.
GET [base]/CodeSystem?system=http://code.system/eyes.color
Aidbox does not support updates for the CodeSystem resource.
In the terminology, it is a good practice not to update existing Coded Systems. Aidbox follows this principle. If you need to update any existing CodeSystem resource, you will have to explicitly delete this CodeSystem and re-create it again with your changes.
Delete
On delete CodeSystem, Aidbox deletes CodeSystem resource, and marks each Concept with the deprecated = true.
For example, let's create a CodeSystem with a custom subset of Units of measurement (aka ). We will compose this CodeSystem from the most common healthcare units of measure.
And then, create all listed concepts. We can create a set of concepts via multiple POST requests or via one request.
Aidbox supports all standard CodeSystem operations.