PHPackages                             nikitakls/cda - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. nikitakls/cda

ActiveLibrary[File &amp; Storage](/categories/file-storage)

nikitakls/cda
=============

A package to create cda files for n3health

v0.3(10mo ago)194MITPHP

Since Jun 24Pushed 10mo agoCompare

[ Source](https://github.com/nikitakls/cda)[ Packagist](https://packagist.org/packages/nikitakls/cda)[ RSS](/packages/nikitakls-cda/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

CDA
===

[](#cda)

Create HL7-CDA (tm) documents in PHP.

This library has some Australian CDA Extensions enabled.
This library is a work in progress and does not currently provide full CDA coverage.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b720fc8d42de1a41b513ebc3364768cb488dae6324ef8606d3e15d4814db9131/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7068702d6865616c74682f6364612f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/php-health/cda/?branch=master)

Usage
-----

[](#usage)

To see how to use the library check out the tests folder. [ClinicalDocument\_test](tests/ClinicalDocument_test.php) and [NCTIS\_test](tests/NCTIS_test.php)are good starting points.

### Manage references

[](#manage-references)

Each `ClinicalDocument` has its own `ReferenceManager`, which help to manage references across documents.

`ReferenceType` may be added on some elements to create a reference :

```
$doc = new ClinicalDocument();

$refManager = $doc->getReferenceManager();

// create an element 'element' which may have a reference

$element->setReference($refManager->getReferenceType('my_reference'));
// will create blabla

// add the reference in a text

$text->setText($refManager->getReferenceElement('my_reference'));
// will create

```

Run tests
---------

[](#run-tests)

1. Run composer to load phpunit and build autoload :

```
composer install

```

2. Run tests

```
you might see the the file phpunit-debug in the tests, the file sets up command line debugging for intellij:
export XDEBUG_CONFIG="idekey=phpstorm-xdebug";
phpunit $@

tests are structured so you can run the tests per group.  look for the @group docblock in each test file.

```

Version History
---------------

[](#version-history)

### Version 1.0.0

[](#version-100)

This version has undergone significant refactoring and has had many more tags implemented. There has been some customisation to the Australian context. The [NCTIS\_test](tests/NCTIS_test.php) implements the code examples for an event summary CDA document.

In this version there is now a lot better checking of tag attributes such as moodCodes, classCodes, TypeCodes. These acceptable codes are enumerated in their Interfaces. Check out [ClassCodeInterface](lib/Interfaces/ClassCodeInterface.php)for an example. The possible attributes for each tag are derived from the schema documents and set using the setAcceptable&lt; Attribute &gt;Codes methods.

PHP Traits have been used extensively to improve the code-styling/readability and to reduce unnecessary code duplication.

Note that while every effort was made to maintain compatibility with the previous version some changes were required, and some breaking changes were made.

### Version 0.1.0

[](#version-010)

First release

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance55

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

3

Last Release

303d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0744a5429c5ad1a48a1723542d9297ed6c777bd03e07127e54bafd2d3017fc07?d=identicon)[nikitakls](/maintainers/nikitakls)

---

Top Contributors

[![julienfastre](https://avatars.githubusercontent.com/u/345600?v=4)](https://github.com/julienfastre "julienfastre (26 commits)")[![nikitakls](https://avatars.githubusercontent.com/u/2038333?v=4)](https://github.com/nikitakls "nikitakls (7 commits)")[![leneaniki](https://avatars.githubusercontent.com/u/169373997?v=4)](https://github.com/leneaniki "leneaniki (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nikitakls-cda/health.svg)

```
[![Health](https://phpackages.com/badges/nikitakls-cda/health.svg)](https://phpackages.com/packages/nikitakls-cda)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
