Entities & Attributes
Aidbox Core Engine Overview
In Aidbox, almost everything is a Resource. Resource has a type, which is placed in resourceType attribute. All resource types are described with "meta-resources" - Entity and Attribute. Entity defines the resource or complex type and set of Attributes describe its structure.

Entity

Entity is meta-resource, which describe all resources in aidbox. There are three types of Entities: resource, type and primitive.

Primitives:

Aidbox has a set of built-in primitive types. You can get a list of primitive types by this request :
1
GET /Entity?type=primitive\
2
&_result=array\
3
&_elements=id,description\
4
&_count=1000\
5
&_sort=_id
6
7
# 200
8
- {id: base64Binary, description: Primitive Type base64Binary}
9
- {id: boolean, description: Primitive Type boolean}
10
- {id: canonical, description: Primitive Type canonical}
11
- {id: code, description: Primitive Type code}
12
- {id: date, description: Primitive Type date}
13
- {id: dateTime, description: Primitive Type dateTime}
14
- {id: decimal, description: Primitive Type decimal}
15
- {id: email, description: Primitive Type email}
16
- {id: id, description: Primitive Type id}
17
- {id: instant, description: Primitive Type instant}
18
- {id: integer, description: Primitive Type integer}
19
- {id: keyword, description: Primitive type for keywords and ids}
20
...
Copied!
For now there is no way to define custom primitive type. Contact us if you need it.

Complex Types:

Complex types are built from primitive types and re-used to define repeating complex elements in resources. Here is the request to inspect complex types in your box.
1
GET /Entity?type=type\
2
&_result=array\
3
&_elements=id,description\
4
&_count=1000\
5
&_sort=_id
6
7
# 200
8
- {id: Address, description: An address expressed using postal conventions (as opposed to GPS or other location definition formats)}
9
- {id: Age, description: A duration of time during which an organism (or a process) has existed}
10
- {id: Annotation, description: Text node with attribution}
11
- {id: Attachment, description: Content in a format defined elsewhere}
12
- {id: CodeableConcept, description: Concept - reference to a terminology or just text}
13
- {id: Coding, description: A reference to a code defined by a terminology system}
14
- {id: ContactDetail, description: Contact information}
15
- {id: ContactPoint, description: 'Details of a Technology mediated contact point (phone, fax, email, etc.)'}
16
- {id: Contributor, description: Contributor information}
17
- {id: Count, description: A measured or measurable amount}
18
- {id: DataRequirement, description: Describes a required data ite
Copied!
You can list Attributes of complex type with:
1
GET /Attribute?entity=Address\
2
&_result=array\
3
&_elements=path,type.id,description\
4
&_sort=_id
5
6
# 200
7
- path: [city]
8
type: {id: string}
9
description: Name of city, town etc.
10
- path: [country]
11
type: {id: string}
12
description: Country (e.g. can be ISO 3166 2 or 3 letter code)
13
- path: [district]
14
type: {id: string}
15
description: District name (aka county)
16
- path: [id]
17
type: {id: string}
18
description: Unique id for inter-element referencing
19
...
Copied!

Resources

Entities with the type resource represent Aidbox resources. Aidbox generates the database schema to store resources on the fly, REST endpoints to Create/Read/Update/Patch/Delete/Search, validation schema etc.
You can list resources in your box with:
1
GET /Entity?type=resource\
2
&_result=array\
3
&_elements=id,module,description\
4
&_count=1000\
5
&_sort=_id
6
7
# 200
8
- {id: AccessPolicy, module: auth}
9
- {id: Account, module: fhir-4.0.0, description: 'Tracks balance, charges, for patient or cost center'}
10
- {id: ActivityDefinition, module: fhir-4.0.0, description: 'The definition of a specific activity to be taken, independent of any particular patient or context'}
11
- {id: AdverseEvent, module: fhir-4.0.0, description: 'Medical care, research study or other healthcare event causing physical injury'}
12
- {id: AidboxConfig, module: box}
13
- {id: AidboxJob, module: proto, description: Aidbox jobs to run}
14
- {id: AidboxJobStatus, module: proto, description: Aidbox jobs status}
15
- {id: AidboxMigration, module: proto, description: Aidbox migrations}
16
- {id: AidboxProfile, module: proto, description: Aidbox validation profile}
17
- {id: AidboxQuery, module: proto, description: Aidbox custom query}
18
- {id: AidboxSubscription, module: proto, description: Subscribe to resources}
19
- {id: AllergyIntolerance, module: fhir-4.0.0, description: 'Allergy or Intolerance (generally: Risk of adverse reaction to a substance)'}
Copied!
And see attributes of the specific resource:
1
GET /Attribute?entity=Patient\
2
&_result=array\
3
&_elements=path,type.id,description\
4
&_sort=_id
5
# 200
6
7
- path: [active]
8
type: {id: boolean}
9
description: Whether this patient's record is in active use
10
- path: [address]
11
type: {id: Address}
12
description: An address for the individual
13
- path: [deceased]
14
description: Indicates if the individual is deceased or not
15
- path: [multipleBirth]
16
description: Whether patient is part of a multiple birth
17
- path: [birthDate]
18
type: {id: date}
19
description: The date of birth for the individual
20
- path: [communication]
21
description: A language which may be used to communicate with the patient about his or her health
22
- path: [communication, id]
23
type: {id: string}
24
description: Unique id for inter-element referencing
25
...
Copied!
Copy link
Contents
Entity