chernegasergiy/nk-026-2021-parser

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

A PHP library to parse the NK-026-2021 (Classifier of Medical Interventions) from meddata.pp.ua.

Maintainers

Package info

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

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

Transparency log

Statistics

Installs: 1 858

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-05-03 21:19 UTC

This package is auto-updated.

Last update: 2026-08-11 18:05:09 UTC


README

Stand With Ukraine

NK-026-2021 Parser

Latest Stable Version Total Downloads License

A PHP library to parse the NK-026-2021 (Classifier of Medical Interventions) from meddata.pp.ua.

Installation

You can install the package via Composer:

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

Usage

The parse() method returns an InterventionCollection object which you can iterate over, or use the finder methods to search for specific interventions.

Basic Usage

<?php

require 'vendor/autoload.php';

use MedCore\Nk0262021Parser\Parser;

$parser = new Parser();

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

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

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

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

Finding an Intervention

You can find an intervention by its code.

<?php

// ...

$intervention = $parser->findByCode('40803-00');
if ($intervention) {
    echo $intervention->name_ua; // Внутрішньочерепна стереотаксична локалізація
    echo $intervention->class_name; // ПРОЦЕДУРИ НА НЕРВОВІЙ СИСТЕМІ
    echo $intervention->anatomical_site_name; // ЧЕРЕП, ОБОЛОНКИ МОЗКУ ТА ГОЛОВНИЙ МОЗОК
}

Searching for Interventions

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

<?php

// ...

$results = $parser->searchByName('стереотаксична');

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

Filtering by Class, Anatomical Site, Procedure Type or Group

You can filter interventions by various criteria.

<?php

// ...

// Find by class name
$nervous_system = $parser->findByClassName('НЕРВОВІЙ СИСТЕМІ');

foreach ($nervous_system as $intervention) {
    echo $intervention->code . ': ' . $intervention->name_ua . PHP_EOL;
}

// Find by anatomical site
$skull = $parser->findByAnatomicalSite('ЧЕРЕП');

foreach ($skull as $intervention) {
    echo $intervention->code . ': ' . $intervention->name_ua . PHP_EOL;
}

// Find by procedure type
$examinations = $parser->findByProcedureType('ОБСТЕЖЕННЯ');

foreach ($examinations as $intervention) {
    echo $intervention->code . ': ' . $intervention->name_ua . PHP_EOL;
}

// Find by procedure group
$localization = $parser->findByProcedureGroup('Обстеження черепа');

foreach ($localization as $intervention) {
    echo $intervention->code . ': ' . $intervention->name_ua . PHP_EOL;
}

Data Structure

Each Intervention object contains:

  • class_code — class code (e.g., "Клас 1")
  • class_name — class name (e.g., "ПРОЦЕДУРИ НА НЕРВОВІЙ СИСТЕМІ")
  • anatomical_site_code — anatomical site code (integer)
  • anatomical_site_name — anatomical site name
  • procedure_type_code — procedure type code (integer)
  • procedure_type_name — procedure type name
  • procedure_group_code — procedure group code (integer)
  • procedure_group_name — procedure group name
  • code — intervention code (e.g., "40803-00")
  • name_ua — Ukrainian name
  • name_en — English name

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.