PHPackages                             mmerlijn/msg-edifact32 - 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. mmerlijn/msg-edifact32

ActiveProject

mmerlijn/msg-edifact32
======================

Dutch healthcare read/write edifact3.2 to/from repository

v3.0(3mo ago)133MITPHPPHP ^8.3

Since Nov 15Pushed 3mo ago1 watchersCompare

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

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

Edifact32 MEDRPT
================

[](#edifact32-medrpt)

Write Medrpt edifact messages form msg repository

### Requirements

[](#requirements)

`php >=8.1`

### Installation

[](#installation)

` composer require mmerlijn/msg-edifact32`

### Writing messages

[](#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

[](#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

[](#result)

```
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance78

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~71 days

Recently: every ~143 days

Total

12

Last Release

119d ago

Major Versions

v1.5 → v2.02024-06-17

v2.4 → v3.02026-01-11

PHP version history (3 changes)v1.0PHP ^8.1

v2.0PHP ^8.2

v3.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/84de98c9a1803dbd730aabade43023ab14d7df77a5e71c012ecdd1150b300213?d=identicon)[mmerlijn](/maintainers/mmerlijn)

---

Top Contributors

[![mmerlijn](https://avatars.githubusercontent.com/u/8401393?v=4)](https://github.com/mmerlijn "mmerlijn (13 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/mmerlijn-msg-edifact32/health.svg)

```
[![Health](https://phpackages.com/badges/mmerlijn-msg-edifact32/health.svg)](https://phpackages.com/packages/mmerlijn-msg-edifact32)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[spatie/laravel-sitemap

Create and generate sitemaps with ease

2.6k14.6M107](/packages/spatie-laravel-sitemap)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)

PHPackages © 2026

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