kyleweishaupt / php-icd10
PHP ICD-10 解析器
0.0.1
2023-03-29 20:16 UTC
Requires
- php: >=8.1
README
PHP 库,用于解析 CMS 医疗保险 ICD-10 码。
安装
使用 Composer 安装
composer require kyleweishaupt/php-icd10
用法
use ICD10Parser\ICD10Parser; // From ordered .txt file $filePath = __DIR __ . "/data/icd10cm_order_2023.txt"; $orderedCodes = ICD10Parser::fromFile($filePath)->toArray(); // Get the first code in the file $firstCode = $orderedCodes[0]; var_dump($firstCode); // object(ICD10Parser\ICD10CodeOrdered) { // ["order"]=> int(1) // ["code"] =>string(3) "A00" // ["valid"] => bool(false) // ["shortDescription"] => string(7) "Cholera" // ["longDescription"] => string(7) "Cholera" // } // Get code with decimal as string $code = $firstCode->codeFormatted(); // A001 -> A00.1 // Or get from string contents (in case file loaded or ephemeral, etc.) $orderedCodes = ICD10Parser::fromString($stringContents)->toArray();
贡献
该软件可能未来会被维护,也可能不会被维护。如果您需要在生产环境中使用此功能,强烈建议您将该仓库进行分支。
许可
此软件包与 CMS 和/或美国政府没有任何关联。没有任何保证,使用此软件包完全风险自担。任何非法或恶意使用均严格禁止。
版权 (c) 2023-present,许可协议遵循 MIT 许可协议。