mmerlijn/msg-edifact32
Composer 安装命令:
composer create-project mmerlijn/msg-edifact32
包简介
Dutch healthcare read/write edifact3.2 to/from repository
README 文档
README
Write Medrpt edifact messages form msg repository
Requirements
php >=8.1
Installation
composer require mmerlijn/msg-edifact32
Writing messages
// fill the msg repository $msg = new Msg(); $msg->sender->agbcode = "1234567"; $msg->receiver->agbcode = "7654321"; //... $msg->id = "abc123"; //unique message id //Patient data $msg->patient->addId(new Id(id:"123456782",type:"bsn")); $msg->patient->setName(new Name( own_lastname:"Doe",initials:"J" )); $msg->patient->setSex("M"); $msg->patient->dob = Carbon::create("2000-10-05"); $msg->patient->setAddress(new Address( street: "Long Street",building: "14a",city: "Amsterdam",postcode: "1040AA" )); $msg->patient->addPhone("0612341234"); $msg->patient->setInsurance(new Insurance( company_name: "CC Comp", policy_nr: "01234123124", uzovi: "1234", )); //order data $msg->order->admit_reason_code = "ABC"; $msg->order->admit_reason_name = "Xohabia"; $msg->order->control ="NEW"; //NEW / CANCEL / CHANGE / RESULT $msg->order->request_nr = "AB123123123"; $msg->priority = false; $msg->db_of_request = Carbon::now(); $msg->order->requester->agbcode = "0123456"; $msg->order->requester->setName(new Name(own_lastname: 'Arts',initials:"RP"));; $msg->order->requester->source = "VEKTIS"; //requests $msg->order->addRequest(new Request( test_code: "BBB", test_name: "Blubber" )); $msg->order->where = "home"; // home=>L / other / else =>O //result $msg->order->addResult(new Result( type_of_value:"ST", //optional ST/NM/CE/FT test_code: "CCC", test_name: "Circular", value: "true", done: true, //final value change:false, )); $msg->order->dt_of_observation = Carbon::now(); $msg->order->dt_of_analysis = Carbon::now(); //comments $msg->addComment("Hello World"); //belongs to msg $msg->order->requests->addComment("Hello Day"); // comment on request $msg->order->result->addComment("Good morning") // comment on result //create HL7 instance $edi32 = new \mmerlijn\msgEdifact32\Edifact32() //setting the data $edi32->setMsg($msg); // try{ echo $edi32->write(true); //with or without validation of required fields }catch(\Exception $e){ echo $e; }
It is also possible to start with a template and add/overwrite msg data afterwards
Getting message
//init instance $edi32 = new \mmerlijn\msgEdifact32\Edifact32("UNB+UNOA:1+50..."); //or $edi32 = new \mmerlijn\msgEdifact32\Edifact32(); $edi32->read("MSH..."); //read data to repository (not tested, not planned for implementation) $msg = $edi32->getMsg(new Msg());
Result
mmerlijn/msg-edifact32 适用场景与选型建议
mmerlijn/msg-edifact32 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 11 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mmerlijn/msg-edifact32 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mmerlijn/msg-edifact32 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-15