Skip to content

HL7 Parsing #81

Answered by senaranya
anagen asked this question in Q&A
Discussion options

You must be logged in to vote
  • Install composer unless already installed
  • Create a directory for your project, along with a directory src inside it
  • Inside the project directory, run the command: composer require aranyasen/hl7 (this installs the library in vendor/ directory)
  • Add a basic script, say src/hl7_demo.php:
<?php

declare(strict_types=1);

namespace src;

require_once 'vendor/autoload.php';

use Aranyasen\HL7\Message;

$msg = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|", null, true); // Create Message object from a HL7 string
echo $msg->toString(true); // Print it to make sure the object was created successfully
  • use php src/hl7_demo.php to run it

Note: This is a bare-minimum script to demonstrate how to …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by senaranya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants