rwos/redox

PHP mappings for Redox Engine

0.1.0 2017-01-18 17:22 UTC

README

Latest Stable Version License Build Status Code Coverage Scrutinizer Code Quality

PHP mappings for Redox Engine. Attempts to be PSR-1, PSR-2, and PSR-4 compliant.

DEPRECATED AND WILL EVENTUALLY BE DELETED. We have decided to take a Tolerant Reader approach instead of using code generation.

Installation

composer require rwos/redox

Usage

use RoundingWell\Redox\PushMessage;

// Using a file path
$push = PushMessage::fromFile($path);

// Using a JSON string
$push = PushMessage::fromString($json);

// Using decoded JSON data
$push = PushMessage::fromObject($data);

Once created, the entire Redox document structure will be available:

$patientFirstName = $push->Header->Patient->Demographics->FirstName;

foreach ($push->Allergies as $allergy) {
    echo "$patientFirstName is allergic to ", $allergy->Substance->Name, "\n";
}

Refer the Redox data models for a complete reference of available fields.