Convert-Pheno

 view release on metacpan or  search on metacpan

api/perl/README.md  view on Meta::CPAN

# README Convert-Pheno-API (Perl version)

This directory contains the Perl REST wrapper around `Convert::Pheno`.

### Notes:

* The API is built with `Mojolicious`.
* The public REST contract uses a single `POST /api` endpoint.
* `/api` receives a JSON object with explicit `conversion`, `input`, `output`, and `options` sections.
* Incoming request bodies are validated against the [OpenAPI schema](./openapi.json) and a public field allowlist.
* The conversion logic still runs in `Convert::Pheno`; this wrapper only exposes it over an HTTP(S) endpoint.

The HTTP API accepts in-memory data under `input.data`. It deliberately rejects
host filesystem options such as `in_file`, `out_file`, `mapping_file`, and
`path_to_ohdsi_db`. BFF, PXF, FHIR R4 Bundles, openEHR, and table-oriented OMOP payloads can
be sent over HTTP; file-based CSV, REDCap, CDISC-ODM, and Dataset-JSON routes
should use the CLI or module interface.

For OMOP input, `input.data` is an object keyed by table name. Each value is an
array of row objects, as shown in [omop.json](./omop.json). Include `CONCEPT`
and `PERSON`; Convert-Pheno groups the rows by `person_id` internally.

api/python/README.md  view on Meta::CPAN

# README Convert-Pheno-API (Python version)

This directory contains the Python REST wrapper around `Convert::Pheno`.

### Notes:

* The API is built with FastAPI.
* The public REST contract uses a single `POST /api` endpoint.
* `/api` receives a JSON object with explicit `conversion`, `input`, `output`, and `options` sections.
* Incoming request bodies are validated against a public field allowlist before conversion.
* The Python layer calls the Perl conversion code through `api/perl/json_bridge.pl`.
* The conversion logic still runs in Perl; this wrapper only exposes the same REST contract through FastAPI.

The HTTP API accepts in-memory data under `input.data`. It deliberately rejects
host filesystem options such as `in_file`, `out_file`, `mapping_file`, and
`path_to_ohdsi_db`. BFF, PXF, FHIR R4 Bundles, openEHR, and table-oriented OMOP payloads can
be sent over HTTP; file-based CSV, REDCap, CDISC-ODM, and Dataset-JSON routes
should use the CLI or module interface.



( run in 2.089 seconds using v1.01-cache-2.11-cpan-5c0b1e786e0 )