docker dev update
[openemr.git] / library / classes / PQRIXml.class.php
blob63a6d0b985d6aa9dd8f2f446cb57cdaffe11571d
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.
12 class PQRIXml extends XmlWriterOemr
15 function __construct($indent = ' ')
17 parent::__construct($indent);
20 function open_submission()
23 $this->push('submission', array('type'=>'PQRI-REGISTRY', 'option'=>'payment',
24 'xmlns:xsi'=>'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation'=>'Registry_Payment.xsd'));
27 function close_submission()
29 $this->pop();
33 function add_file_audit_data()
36 $res = sqlQuery("select * from users where username=?", array($_SESSION{"authUser"}));
39 $this->push('file_audit_data');
40 $this->element('create-date', date("m-d-Y"));
41 $this->element('create-time', date("H:i"));
42 $this->element('create-by', $res{"fname"}.' '.$res{"lname"});
43 $this->element('version', '1.0');
44 $this->element('file-number', '1');
45 $this->element('number-of-files', '1');
46 $this->pop();
49 function add_registry($submission_method)
52 $this->push('registry');
53 $this->element('registry-name', $GLOBALS['pqri_registry_name']);
54 $this->element('registry-id', $GLOBALS['pqri_registry_id']);
55 $this->element('submit-method', $submission_method);
56 $this->pop();
59 function add_measure_group_stats($arrStats)
61 $this->push('measure-group-stat');
63 foreach ($arrStats as $key => $value) {
64 $this->element($key, $value);
67 $this->pop();
70 function add_pqri_measures($arrStats)
72 $this->push('pqri-measure');
74 foreach ($arrStats as $key => $value) {
75 $this->element($key, $value);
78 $this->pop();
82 function open_provider($arrStats)
84 $this->push('provider');
86 foreach ($arrStats as $key => $value) {
87 $this->element($key, $value);
91 function close_provider()
93 $this->pop();
96 function open_measure_group($id)
98 $this->push('measure-group', array('ID'=>$id));
101 function close_measure_group()
103 $this->pop();