{"id":21287740,"url":"https://github.com/stjudecloud/cde-transformers","last_synced_at":"2025-03-15T15:25:44.428Z","repository":{"id":211141680,"uuid":"689034144","full_name":"stjudecloud/cde-transformers","owner":"stjudecloud","description":"TODO","archived":false,"fork":false,"pushed_at":"2024-05-24T15:51:24.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-18T15:23:48.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stjudecloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-08T16:31:29.000Z","updated_at":"2024-05-24T15:50:05.000Z","dependencies_parsed_at":"2024-10-25T20:16:21.770Z","dependency_job_id":"14fb5bb1-acbe-48c3-85aa-9305f04e7d56","html_url":"https://github.com/stjudecloud/cde-transformers","commit_stats":null,"previous_names":["stjudecloud/cde-transformers"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stjudecloud%2Fcde-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stjudecloud%2Fcde-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stjudecloud%2Fcde-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stjudecloud%2Fcde-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stjudecloud","download_url":"https://codeload.github.com/stjudecloud/cde-transformers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243748049,"owners_count":20341627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T12:15:35.289Z","updated_at":"2025-03-15T15:25:44.408Z","avatar_url":"https://github.com/stjudecloud.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# St Jude - CDE Transformers\n\n## Overview\n\nA PHP package to transform your gnomics values into permissible values for commonly used CDEs within the CCDI API.\n\nThe values you have within your system may not match the permissible values for the CDEs. This package provides a way to transform your values into permissible values for the CDEs. As well as providing an `AbstractTransformer` class that can be extended to prodice custom transformations.\n\n## Requirements\n\nThis package requires the following to work as expected:\n\n- PHP 8.2.7\n\nOptional:   \n\n- PHPUnit ^10.3\n\n## Installation\n\nInstall the package via composer:\n\n```bash\ncomposer require stjude/cde-transformers\n```\n\n## Usage\n\n```php\n\u003c?php   \nrequire_once __DIR__ . '/vendor/autoload.php';\nuse CCDI\\Transformer\\V0\\SexTransformer;\n$femalePermissibleValue = SexTransformer::transform('FEMALE')['permissible_value'];\n?\u003e\n```\n\nAlso see `index.php` for more examples.\n\n## Custom Tranformers\n\nA demo Customer Transform exists in `src/Demo/AcmeHospital/AcmeSexTransformer.php`. This can be used as a starting point for creating your own custom transformers.\n\nThis demo transformer has been created to transform the values of `boy` to the CDE value for `Male` and `girl` to the CDE value for `Female`.\n\nAnother example follows for transforming Swedish spelling of `Normal`:\n\n```php\nclass AcmeTissueTypeTransformer extends TissueTypeTransformer\n{\n    public static function getMappings(): array\n    {\n        $mappings = TissueTypeTransformer::$MAPPINGS;\n\n        $mappings[] =\n            [\n                'value' =\u003e TissueType::NORMAL,\n                'regex' =\u003e '/^(vanligt)$/i'\n            ];\n\n        return $mappings;\n    }\n}\n```\n\n## CDE Versions\n\nEach CDE's permissible values, long name, concept code, CDE version, description CADsr URL, and public_id are harded coded into a Data class, e.g. `src/CDE/V1/Data/Sex.php`. This is to ensure that the permissible values are always up to date with the CDEs.\n\nOnce a CDE is released, a new version of the package can be released with the new permissible values, long names, etc.\n\nFeel free to create a pull request to add new CDEs.\n\n## Tests\n\nRun tests in `tests/` using\n\n`vendor/bin/phpunit tests/`\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstjudecloud%2Fcde-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstjudecloud%2Fcde-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstjudecloud%2Fcde-transformers/lists"}