Interim autoloaded library/classes via composer classmap, take 4. (#422)
[openemr.git] / library / classes / PQRIXml.class.php
blobd152d35cc0783fac811283f0882f6f500f1ed42c
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 {
14 function __construct($indent = ' ') {
15 parent::__construct($indent);
18 function open_submission() {
20 $this->push('submission', array('type'=>'PQRI-REGISTRY', 'option'=>'payment',
21 'xmlns:xsi'=>'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation'=>'Registry_Payment.xsd'));
24 function close_submission() {
25 $this->pop();
29 function add_file_audit_data() {
31 $res = sqlQuery("select * from users where username=?", array($_SESSION{"authUser"}) );
34 $this->push('file_audit_data');
35 $this->element('create-date', date("m-d-Y"));
36 $this->element('create-time', date("H:i"));
37 $this->element('create-by', $res{"fname"}.' '.$res{"lname"});
38 $this->element('version', '1.0');
39 $this->element('file-number', '1');
40 $this->element('number-of-files', '1');
41 $this->pop();
44 function add_registry($submission_method) {
46 $this->push('registry');
47 $this->element('registry-name', $GLOBALS['pqri_registry_name']);
48 $this->element('registry-id', $GLOBALS['pqri_registry_id']);
49 $this->element('submit-method', $submission_method);
50 $this->pop();
53 function add_measure_group_stats($arrStats) {
54 $this->push('measure-group-stat');
56 foreach ($arrStats as $key => $value)
58 $this->element($key, $value);
61 $this->pop();
64 function add_pqri_measures($arrStats) {
65 $this->push('pqri-measure');
67 foreach ($arrStats as $key => $value)
69 $this->element($key, $value);
72 $this->pop();
76 function open_provider($arrStats) {
77 $this->push('provider');
79 foreach ($arrStats as $key => $value)
81 $this->element($key, $value);
86 function close_provider() {
87 $this->pop();
90 function open_measure_group($id) {
91 $this->push('measure-group', array('ID'=>$id));
94 function close_measure_group() {
95 $this->pop();