chernegasergiy/nk-025-2021-parser

This package is abandoned and no longer maintained. The author suggests using the medcore-ua/nk-025-2021-parser package instead.

A PHP library to parse the NK-025-2021 medical classifications from meddata.pp.ua.

Maintainers

👁 ChernegaSergiy

Package info

github.com/medcore-ua/nk-025-2021-parser

pkg:composer/chernegasergiy/nk-025-2021-parser

Statistics

Installs: 1 851

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2025-11-23 20:21 UTC

Requires

  • php: >=8.0

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

LicenseRef-CSSM-Unlimited-2.0 cf236e0efb0b4369f5d59cd0fa45ddde09d6e506

  • Serhii Cherneha <chernegasergiy3.woop@gmail.com>

This package is auto-updated.

Last update: 2026-05-03 21:20:07 UTC


README

👁 Latest Stable Version
👁 Total Downloads
👁 License

A PHP library to parse the NK-025-2021 medical classifications from meddata.pp.ua.

Installation

You can install the package via Composer:

composer require medcore-ua/nk-025-2021-parser

Usage

The parse() method returns a ClassificationCollection object which you can iterate over, or use the finder methods to search for specific classifications.

Basic Usage

<?php

require 'vendor/autoload.php';

use MedCore\Nk0252021Parser\Parser;

$parser = new Parser();

try {
 $classifications = $parser->parse();

 // Iterate over all classifications
 foreach ($classifications as $classification) {
 echo $classification->name_ua . PHP_EOL;
 }

 // Get the total count
 echo "Total classifications: " . count($classifications) . PHP_EOL;

} catch (Exception $e) {
 echo 'Error: ' . $e->getMessage();
}

Finding a Classification

You can find a classification by its code or specific code.

<?php

// ...

$cholera = $parser->findByCode('A00');
echo $cholera->name_ua; // Холера

$choleraBiotar = $parser->findBySpecificCode('A00.0');
echo $choleraBiotar->name_ua; // Холера, спричинена холерним вібріоном 01, biovar cholera

Searching for Classifications

You can search for classifications by name (in either Ukrainian or English).

<?php

// ...

$results = $parser->searchByName('тиф');

foreach ($results as $result) {
 echo $result->specific_code . ': ' . $result->specific_name_ua . PHP_EOL;
}

Contributing

Contributions are welcome and appreciated! Here's how you can contribute:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please make sure to update tests as appropriate and adhere to the existing coding style.

License

This library is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the LICENSE file for details.