Consumes OpenTHC Lab Metrics and WCIA Analytes, and produces diff objects and docs for use in WA State interop.
-
Load the storage area with the OpenTHC Lab Metrics.
Clone the https://github.com/openthc/api.git repository and copy itsetc/lab-metricfolder to this repository'sstorage/folder (i.e.,storage/lab-metric). -
Load the storage area with the WCIA analytes json files. Clone the https://github.com/conflabs/wcia-analytes.git repository and copy its
json/folder to this repository'sstorage/folder (i.e.,storage/json). -
From the CLI, run
php makeOpenTHCResource.phpto create the OpenTHC Json Resource.
It is saved to the storage dir.
From the CLI, run php makeNotInWciaList.php to create a list of OpenTHC lab metrics that are not in the WCIA list.
From the CLI, run php makeNewWciaAnalytes.php to create a list of new WCIA analytes from the OpenTHC lab metrics list.
From the CLI, run php makeNotInOpenThcList.php to create a list of WCIA analytes that are not in the OpenTHC list.
From the CLI, run php makeNewOpenThcLabMetrics.php to create a list of new OpenTHC stubs from the WCIA analytes list.
From the CLI, run php makeMarkDown.php to create a series of mark down docs in the storage/docs folder.
The tests/ folder is a reflection of the src/ folder, but containing Unit Test classes. Run the unit tests from the
CLI, like so: php vendor/bin/phpunit tests/.
This project uses PHPStan for static analysis, and at a default level of 5. Run the analyser from the CLI like so,
vendor/bin/phpstan analyse --level 5 src.
For simple, reproducible server environments, I've included a Dockerfile for creating a quick CLI environment with which to run these scripts.
docker build -f Dockerfile -t wcia/analytes-generator:latest .
docker run -it --rm -v $PWD:/srv wcia/analytes-generator:latest bash
docker run -it --rm -v $PWD:/srv wcia/analytes-generator:latest php vendor/bin/phpunit tests/
docker run -it --rm -v $PWD:/srv wcia/analytes-generator:latest vendor/bin/phpstan analyse --level 5 src