reformat initial comment block.
[openemr.git] / library / classes / PQRIXml.class.php
blobbdcee35ceaf4ef1add7df1251cdbff4ab3b1e9e5
1 <?php
2 // Copyright (C) 2011 Ensoftek
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
9 // This program implements the XML Writer to generate PQRI 2009 XML.
11 require_once("XmlWriterOemr.class.php");
13 class PQRIXml extends XmlWriterOemr {
15 function PQRIXml($indent = ' ') {
16 parent::XmlWriterOemr($indent);
19 function open_submission() {
21 $this->push('submission', array('type'=>'PQRI-REGISTRY', 'option'=>'payment',
22 'xmlns:xsi'=>'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation'=>'Registry_Payment.xsd'));
25 function close_submission() {
26 $this->pop();
30 function add_file_audit_data() {
32 $res = sqlQuery("select * from users where username=?", array($_SESSION{"authUser"}) );
35 $this->push('file_audit_data');
36 $this->element('create-date', date("m-d-Y"));
37 $this->element('create-time', date("H:i"));
38 $this->element('create-by', $res{"fname"}.' '.$res{"lname"});
39 $this->element('version', '1.0');
40 $this->element('file-number', '1');
41 $this->element('number-of-files', '1');
42 $this->pop();
45 function add_registry($submission_method) {
47 $this->push('registry');
48 $this->element('registry-name', $GLOBALS['pqri_registry_name']);
49 $this->element('registry-id', $GLOBALS['pqri_registry_id']);
50 $this->element('submit-method', $submission_method);
51 $this->pop();
54 function add_measure_group_stats($arrStats) {
55 $this->push('measure-group-stat');
57 foreach ($arrStats as $key => $value)
59 $this->element($key, $value);
62 $this->pop();
65 function add_pqri_measures($arrStats) {
66 $this->push('pqri-measure');
68 foreach ($arrStats as $key => $value)
70 $this->element($key, $value);
73 $this->pop();
77 function open_provider($arrStats) {
78 $this->push('provider');
80 foreach ($arrStats as $key => $value)
82 $this->element($key, $value);
87 function close_provider() {
88 $this->pop();
91 function open_measure_group($id) {
92 $this->push('measure-group', array('ID'=>$id));
95 function close_measure_group() {
96 $this->pop();