PHP Class FhirMarshal

OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Inheritance: extends CApplicationComponent
Show file Open project: openeyes/openeyes

Public Properties

Property Type Description
$schemas

Public Methods

Method Description
getSchema ( string $type ) : array Fetch the schema for the specified FHIR type as a PHP array.
isStandardType ( string $type ) : boolean Check whether a FHIR type is part of the standard or a custom OE type.
parseJson ( string $text ) : StdClass | null
parseXml ( string $text ) : StdClass | null
parseXmlBundle ( DOMDocument $doc, DOMElement $element )
renderJson ( StdClass $resource ) : string
renderXml ( StdClass $resource ) : string

Private Methods

Method Description
parseXmlRecursive ( DOMDocument $doc, DOMElement $element, $type, array $schema )
renderXmlBundle ( StdClass $data, DOMDocument $doc, DOMNode $parent )
renderXmlRecursive ( StdClass $data, DOMDocument $doc, DOMNode $parent )

Method Details

getSchema() public method

Fetch the schema for the specified FHIR type as a PHP array.
public getSchema ( string $type ) : array
$type string
return array

isStandardType() public method

Check whether a FHIR type is part of the standard or a custom OE type.
public isStandardType ( string $type ) : boolean
$type string
return boolean

parseJson() public method

public parseJson ( string $text ) : StdClass | null
$text string
return StdClass | null

parseXml() public method

public parseXml ( string $text ) : StdClass | null
$text string
return StdClass | null

parseXmlBundle() public method

public parseXmlBundle ( DOMDocument $doc, DOMElement $element )
$doc DOMDocument
$element DOMElement

renderJson() public method

public renderJson ( StdClass $resource ) : string
$resource StdClass
return string

renderXml() public method

public renderXml ( StdClass $resource ) : string
$resource StdClass
return string

Property Details

$schemas public property

public $schemas