Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

This is a technical documentation for “factor-based” concept ranges. For the background of these ranges, refer to the main documentation.

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.

The solution involves introducing two new tables:

  • concept_reference_range: This table holds the absolute, critical, and normal ranges along with a criteria column. The criteria column contains a coded function that performs validation checks, such as those based on age or gender, using the Velocity engine for evaluation.

  • obs_reference_range: This table stores the validated reference ranges for observation numeric values after the criteria have been applied.

These tables allow for dynamic storage of ranges based on different factors, including combinations like age and gender. For example:

  • concept_numeric able:

    • concept_id: 1, name: “Systolic blood pressure”, hi_critical: 130.0, hi_normal: 120.0, hi_absolute: 120.0, low_critical: 100.0, low_normal: 150.0, low_absolute: 120.0

    • concept_id: 2, name: “Temperature”, hi_critical: 40.0, hi_normal: 37.0, hi_absolute: 37.0, low_critical: 35.0, low_normal: 36.5, low_absolute: 36.8

  • concept_reference_range Table:

    • concept_reference_range_id: 1, concept_id: 1, criteria: ”$patient.getAgeInMonths() > 1 && $patient.getAgeInMonths() < 3”, hi_critical: 100.0, hi_normal: 80.0, hi_absolute: 80.0, low_critical: 50.0, low_normal: 64.0, low_absolute: 60.0

    • concept_reference_range_id: 2, concept_id: 1, criteria: ”$patient.getAge() > 18 && $patient.getAge() < 70”, hi_critical: 130.0, hi_normal: 120.0, hi_absolute: 120.0, low_critical: 60.0, low_normal: 80.0, low_absolute: 90.0

This design allows for easy updates and expansions of criteria without requiring changes to the underlying database schema.

Business Logic Flow

 

Screenshot 2024-08-19 at 17.59.53.png

 Schema changes

Note that the main data model is documented here: Concept Data Model . Therefore, this page shows only the new changes in the data model.

  • No labels