定制 akarah/hprim 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

akarah/hprim

Composer 安装命令:

composer require akarah/hprim

包简介

HPRIM parser and generator .

README 文档

README

Build Status Total Downloads Latest Stable Version License

Important: Supported PHP version has been updated to 7.3+. Last supported versions: for PHP 7.2 => 2.0.2, for PHP 7.0 or 7.1 => 1.5.4

Introduction

A PHP-based HPRIM v2.x Parsing and Generating library, inspired by Net-HL7 package (perl).

Installation

composer require Akarah/hprim

Usage

Import library

// First, import classes from the library as needed...
use Akarah\HPRIM\Message;
use Akarah\HPRIM\Segment;
use Akarah\HPRIM\Segments\H;
use Akarah\HPRIM\Segments\P;

Parsing

// Create a Message object from a HL7 string
$msg = new Message("MSH|^~\\&|1|\rPID|||abcd|\r"); // Either \n or \r can be used as segment endings
$P = $msg->getSegmentByIndex(1);
echo $pid->getField(3); // prints 'John'
echo $msg->toString(true); // Prints entire HPRIM string

// Get the first segment
$msg->getFirstSegmentInstance('H'); // Returns the first PID segment. Same as $msg->getSegmentsByName('PID')[0];

// Check if a segment is present in the message object
$msg->hasSegment('P'); // return true or false based on whether PID is present in the $msg object

// Check if a message is empty
$msg = new Message();
$msg->isempty(); // Returns true

Creating new messages

// Create an empty Message object, and populate H and P segments... 

Other

Visit docs\README for details on available APIs

  • All HPRIM message beginning with H segment
  • All HPIM message have L segment at end

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 88
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固