/** * Get acknowledgment status * * @return string */ function getStatutAcknowledgment() { $xpath = new CHL7v2MessageXPath($this->dom_message); return $xpath->queryTextNode("//MSA/MSA.1"); }
/** * Get the text of a node corresponding to an XPath * * @param string $nodeName The XPath to the node * @param DOMNode|null $contextNode The context node from which the XPath starts * @param boolean $root Is root node ? * * @return string */ function queryTextNode($nodeName, DOMNode $contextNode, $root = false) { $xpath = new CHL7v2MessageXPath($contextNode ? $contextNode->ownerDocument : $this); return $xpath->queryTextNode($nodeName, $contextNode); }
/** * Get fields tree * * @param array &$_datatypes Datatypes * @param string $datatype_name Datatype name * @param string $fullpath_component Fullpath * * @return array */ function readDataTypeSchema(&$_datatypes, $datatype_name, $fullpath_component) { if (array_key_exists($datatype_name, CHDataType::$typesMap)) { return array(); } $datatype_schema = $this->message->getSchema("composite", $datatype_name); $datatype_xpath = new CHL7v2MessageXPath($datatype_schema); $fields = $datatype_xpath->query("//field"); foreach ($fields as $_field) { $_component_datatype = $datatype_xpath->queryTextNode("datatype", $_field); $children = array(); $this->readDataTypeSchema($children, $_component_datatype, $fullpath_component); $_datatypes[] = array("name" => $_component_datatype, "fullpath" => "{$fullpath_component}/{$_component_datatype}", "datatype" => $_component_datatype, "children" => $children); } }