Introduction
This is a technical documentation for “factor-based” concept ranges. For the background of these ranges, refer to the main documentation.
The criteria
field in the concept_reference_range
table allows for the dynamic and flexible validation of observations based on various patient attributes.
Architecture
The key challenge in implementing this feature was to design a system that does not require extensive changes to the existing database structure while still being robust and flexible enough to handle a variety of criteria based on different patient factors.
...
concept_reference_range
: This table holds the absolute, critical, and normal ranges along with acriteria
column. Thecriteria
column contains a coded function that performs validation checks, such as those based on age or gender, using the Velocity engine for evaluationvelocity text expressions that evaluate to true or false.obs_reference_range
: This table stores the validated reference ranges for observation numeric values that have been used in validation after the criteria have been applied.
...
This design allows for easy updates and expansions of criteria without requiring changes to the underlying database schema.
Business Logic Flow
...
Schema changes
This section details the new tables and relationships added to the OpenMRS data model to support factor-based concept ranges.
...
Column Name | Data Type | Description |
---|---|---|
|
| Primary key. Unique identifier for each concept reference range. |
|
| Foreign key linking to |
|
| An expression that specifies conditions for when the reference range is applicable. |
|
| The high critical for the concept. |
|
| The high normal for the concept. |
|
| The upper high absolute for the concept. |
|
| The lower low critical for the concept. |
|
| The lower low normal for the concept. |
|
| The lower low absolute for the concept. |
RelationshipsRelationship:
1:N relationship with concept_numeric
: A single concept can have multiple reference ranges based on different criteria.
...
Column Name | Data Type | Description |
---|---|---|
|
| Primary key. Unique identifier for each observation reference range. |
|
| Foreign key linking to the |
|
| The high critical limit for the observation. |
|
| The high normal limit for the observation. |
|
| The high absolute limit for the observation. |
|
| The low critical limit for the observation. |
|
| The low normal limit for the observation. |
|
| The low absolute limit for the observation. |
RelationshipsRelationship:
Has 1:1 relationship with obs
: Each observation has one associated reference range.