Compliance Reporting Engine

The OpenTHC Compliance Reporting Engine is an API and Database to record crop, inventory, lab reports and sales.

The API

This system presents an API, similar to BioTrack, LeafData or Metrc.

Regulatory agencies or MSOs can use this system to collect and draw reports on the companies and licensees they manage.

The Database

Our CRE is backed by PostgreSQL the world's most advanced open source database.

This allows our CRE to scale to thousands of licensees and millions of inventory with ease.

The schema is not complex and uses well-established patterns such as triggers for logging changes and ensuring necessary timestamps are recorded.

The Reporting

The reporting for this system is backed by the Metabase business intelligence platform.

Metabase presents data dashboards, metrics, measurments over time and plenty of statisitics. With Metabase even ad-hoc, custom reports are a breeze.

{% apply markdown %} # Compliance Reporting Engine The CRE is the core database schema (PostgreSQL), API (PHP/Slim) and core test cases (PHPUnit). It is designed to provide a [FAIR](https://en.wikipedia.org/wiki/FAIR_data) data-system for regulators, auditors and businesses. This system is designed primarily to use ULID formatted primary identifiers for all objects. However, it is capable of handling identifiers from legacy systems as well. This system is typically deployed on to a database-host node, with replication and a separate application-host nodes. ## Migration The CRE provides migration scripts to import data from existing platforms. ### Migration from BioTrack Data from an existing BioTrack based environment can be copied in from either API or direct SQL access. The API based import must be run once (or twice) for each License to migrate. ### Migration from LeafData LeafData systems can be migrated via the LeafData API. However, the process must be run once, for each License to migrate. ### Migration from METRC METRC systems can be migrated via the METRC API. The process must be run three times, for each License in sequence (eg: A, B, C; A, B, C; A, B, C) {% endapply %}

Technical Components

Cannabis/Crop Reporting Engine - CRE

This is a simple software solution for collecting and reporting on crops of cannabis or other tightly tracked, regulated products. A simple setup of an event-object-audit-log database, along with the API end-point to collect the necessary details.

The platform is easy to extend by the regulatory agency or their selected vendor through middleware.

More information is available at https://openthc.com/

Global Storage

License Specific Data

Actions / Events

Reporting

APIs

Identifiers

Customizing

If you want to add new custom Services, Middleware or other code use the ./Custom directory. All of your custom libraries would be in ./Custom/Service or ./Custom/Middleware. Then you can use them in the ./webroot/front.php script.