承接 uhin/ccda-parser-library 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

uhin/ccda-parser-library

Composer 安装命令:

composer require uhin/ccda-parser-library

包简介

A library providing data objects to interact with Consolidated Clinical Document Architecture (C-CDA) data.

README 文档

README

Intended Use

This library provides a (read-only) data object for HL7 v3 XML data which can be converted to a PHP array, \stdClass object, or JSON string. It is not intended for modifying the data structure or exporting XML.

Supported Versions/Formats

<Insert documentation about which HL7 v3 (i.e. C-CDA) implementations are supported here>

Library Installation Requirements

How to Use

Including the Library in your Project with Composer

You can manually add the library to your project's composer.json file or use the following command:

composer require uhin/ccda-parser

Then be sure to include the Composer bootstrap file:

include_once('vendor/autoload.php');

Instantiating a Data Object

There are factory methods for creating the data object from a (valid) XML file:

$ccdaDocument = \Uhin\Ccda\Models\CcdaDocument::getDocumentFromFilepath('/path/to/ccda.xml');

from a (valid) XML string:

$ccdaDocument = \Uhin\Ccda\Models\CcdaDocument::getDocumentFromXmlString('<ClinicalDocument />');

and from a \SimpleXMLElement object:

$ccdaDocument = \Uhin\Ccda\Models\CcdaDocument::getDocumentFromSimpleXmlElement($simpleXmlElement);

Accessing the Data Object's Properties

Once you have created the \Uhin\Ccda\Models\CcdaDocument object, you can access its attributes directly:

// The XML data is stored as a \SimpleXMLElement object
$ccdaDocument->simpleXmlElement

// The data object converts that XML data into an array (i.e. dictionary)
$ccdaDocument->data

Converting the Data Object into Desired Formats

You can use the data object's conversion methods to get the XML data in different formats:

// Get the data as an array (i.e. dictionary)
$ccdaDocument->toArray()

// Get the data as a \stdClass object
$ccdaDocument->toStdClass()

// Get the data as a JSON-encoded string
$ccdaDocument->toJson()

// Also returns a JSON-encoded string (used for type-casting to a string)
$ccdaDocument->__toString()
(string) $ccdaDocument

Notes about Structure

This basic XML data:

<ClinicalDocument xmlns:randomNamespace="http://www.w3.org/2001/XMLSchema-instance">
    <globalChild randomNamespace:namespacedAttribute="random value 1" globalAttribute="random value 2">global child value</globalChild>
    <randomNamespace:namespacedChild randomNamespace:namespacedAttribute="random value 3" globalAttribute="random value 4">namespaced child value</randomNamespace:namespacedChild>
</ClinicalDocument>

will be converted into this JSON object:

{
	"ClinicalDocument": {
		"randomNamespace": {
			"namespacedChild": {
				"randomNamespace": {
					"attribute:namespacedAttribute": "random value 3"
				},
				"attribute:globalAttribute": "random value 4",
				"value": "namespaced child value"
			}
		},
		"globalChild": {
			"randomNamespace": {
				"attribute:namespacedAttribute": "random value 1"
			},
			"attribute:globalAttribute": "random value 2",
			"value": "global child value"
		}
	}
}

Because attribute names can conflict with the names of child elements (or there can be a value attribute which would conflict with the way the XML element value is parsed), attributes are prepended with a prefix and a prefix delimiter. The default prefix is attribute and the default prefix delimiter is : (colon). If you would like to use a different prefix and/or delimiter, simply set the following attributes:

$ccdaDocument->elementAttributePrefix = 'differentAttributePrefix'
$ccdaDocument->elementAttributePrefixDelimiter = '-'

And the data attribute and conversion methods will all be updated with the new structure:

{
	"ClinicalDocument": {
		"randomNamespace": {
			"namespacedChild": {
				"randomNamespace": {
					"differentAttributePrefix-namespacedAttribute": "random value 3"
				},
				"differentAttributePrefix-globalAttribute": "random value 4",
				"value": "namespaced child value"
			}
		},
		"globalChild": {
			"randomNamespace": {
				"differentAttributePrefix-namespacedAttribute": "random value 1"
			},
			"differentAttributePrefix-globalAttribute": "random value 2",
			"value": "global child value"
		}
	}
}

Additional Information

About Us

Utah Health Information Network (UHIN) is a non-profit organization in the healthcare industry with goals of improving patient outcomes and reducing healthcare costs. If you are using any of our open source projects or would like to know more about us, we would love to hear from you.

www.uhin.org

Email UHIN Customer Service

Phone: 801-716-5901

Toll Free: 877-693-3071

Address: 1226 E 6600 S Murray, UT 84121

Also, be sure to check out our other projects on GitHub and our knowledge center for more information about healthcare.

uhin/ccda-parser-library 适用场景与选型建议

uhin/ccda-parser-library 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.44k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 05 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 uhin/ccda-parser-library 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 uhin/ccda-parser-library 我们能提供哪些服务?
定制开发 / 二次开发

基于 uhin/ccda-parser-library 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 18.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-21