Internationalization: some more documentation fixes
[openemr.git] / ccr / createCCRResult.php
blob13b8e5d232723f427b2ae5a134f5ca2c8a047c4d
1 <?php
2 // ------------------------------------------------------------------------ //
3 // Garden State Health Systems //
4 // Copyright (c) 2010 gshsys.com //
5 // <http://www.gshsys.com/> //
6 // ------------------------------------------------------------------------ //
7 // This program is free software; you can redistribute it and/or modify //
8 // it under the terms of the GNU General Public License as published by //
9 // the Free Software Foundation; either version 2 of the License, or //
10 // (at your option) any later version. //
11 // //
12 // You may not change or alter any portion of this comment or credits //
13 // of supporting developers from this source code or any supporting //
14 // source code which is considered copyrighted (c) material of the //
15 // original comment or credit authors. //
16 // //
17 // This program is distributed in the hope that it will be useful, //
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20 // GNU General Public License for more details. //
21 // //
22 // You should have received a copy of the GNU General Public License //
23 // along with this program; if not, write to the Free Software //
24 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
25 // ------------------------------------------------------------------------ //
28 $result = getResultData();
29 $row = sqlFetchArray($result);
31 do {
33 $e_Result = $ccr->createElement('Result');
34 $e_Results->appendChild($e_Result);
36 $e_CCRDataObjectID = $ccr->createElement('CCRDataObjectID', getUuid());//, $row['immunization_id']);
37 $e_Immunization->appendChild($e_CCRDataObjectID);
39 $e_DateTime = $ccr->createElement('DateTime');
40 $e_Result->appendChild($e_DateTime);
42 $date = date_create($row['date']);
44 $e_ExactDateTime = $ccr->createElement('ExactDateTime', $date->format('Y-m-d\TH:i:s\Z'));
45 $e_DateTime->appendChild($e_ExactDateTime);
47 $e_IDs = $ccr->createElement('IDs');
48 $e_Result->appendChild($e_IDs);
50 $e_ID = $ccr->createElement('ID', $row['pid']);
51 $e_IDs->appendChild($e_ID);
53 $e_IDs->appendChild(sourceType($ccr, $authorID));
55 $e_Result->appendChild(sourceType($ccr, $authorID));
57 $e_Test = $ccr->createElement('Test');
58 $e_Result->appendChild($e_Test);
60 $e_CCRDataObjectID = $ccr->createElement('CCRDataObjectID', getUuid());
61 $e_Test->appendChild($e_CCRDataObjectID);
63 $e_DateTime = $ccr->createElement('DateTime');
64 $e_Test->appendChild($e_DateTime);
66 $e_ExactDateTime = $ccr->createElement('ExactDateTime', $date->format('Y-m-d\TH:i:s\Z'));
67 $e_DateTime->appendChild($e_ExactDateTime);
69 $e_Type = $ccr->createElement('Type');
70 $e_Test->appendChild($e_Type);
72 $e_Text = $ccr->createElement('Text', 'Observation');
73 $e_Type->appendChild($e_Text);
75 $e_Description = $ccr->createElement('Description' );
76 $e_Test->appendChild($e_Description);
78 $e_Text = $ccr->createElement('Text', $row['ankle_able_to_bear_weight_steps']);
79 $e_Description->appendChild($e_Text);
81 $e_Code = $ccr->createElement('Code');
82 $e_Description->appendChild($e_Code);
84 $e_Value = $ccr->createElement('Value', 'None');
85 $e_Code->appendChild($e_Value);
87 $e_Test->appendChild(sourceType($ccr, $authorID));
89 $e_TestResult = $ccr->createElement('TestResult' );
90 $e_Test->appendChild($e_TestResult);
92 $e_Value = $ccr->createElement('Value', '1.0');
93 $e_TestResult->appendChild($e_Value);
95 $e_Code = $ccr->createElement('Code' );
96 $e_TestResult->appendChild($e_Code);
98 $e_Value = $ccr->createElement('Value', 'Test 01 Code');
99 $e_Code->appendChild($e_Value);
101 $e_Description = $ccr->createElement('Description' );
102 $e_TestResult->appendChild($e_Description);
104 $e_Text = $ccr->createElement('Text', $row['ankle_able_to_bear_weight_steps']);
105 $e_Description->appendChild( $e_Text);
108 if('high' == 'normal' ) {
109 $e_NormalResult = $ccr->createElement('NormalResult','normal');
110 $e_Test->appendChild($e_NormalResult);
111 } else {
112 $e_Flag = $ccr->createElement('Flag', 'high' );
113 $e_Test->appendChild($e_Flag);
115 $e_Text = $ccr->createElement('Text', $row['high']);
116 $e_Flag->appendChild($e_Text);
119 $e_Test = $ccr->createElement('Test');
120 $e_Result->appendChild($e_Test);
122 $e_CCRDataObjectID = $ccr->createElement('CCRDataObjectID', getUuid());
123 $e_Test->appendChild($e_CCRDataObjectID);
125 $e_DateTime = $ccr->createElement('DateTime');
126 $e_Test->appendChild($e_DateTime);
128 $e_ExactDateTime = $ccr->createElement('ExactDateTime', $date->format('Y-m-d\TH:i:s\Z'));
129 $e_DateTime->appendChild($e_ExactDateTime);
131 $e_Type = $ccr->createElement('Type', 'x ray');
132 $e_Test->appendChild($e_Type);
134 $e_Text = $ccr->createElement('Text', 'Observation');
135 $e_Type->appendChild($e_Text);
138 $e_Description = $ccr->createElement('Description' );
139 $e_Test->appendChild($e_Description);
141 $e_Text = $ccr->createElement('Text', $row['ankle_x_ray_interpretation']);
142 $e_Description->appendChild($e_Text);
144 $e_Code = $ccr->createElement('Code');
145 $e_Description->appendChild($e_Code);
147 $e_Value = $ccr->createElement('Value', 'None');
148 $e_Code->appendChild($e_Value);
150 $e_Test->appendChild(sourceType($ccr, $authorID));
152 $e_TestResult = $ccr->createElement('TestResult' );
153 $e_Test->appendChild($e_TestResult);
155 $e_Value = $ccr->createElement('Value', '1.0');
156 $e_TestResult->appendChild($e_Value);
158 $e_Code = $ccr->createElement('Code' );
159 $e_TestResult->appendChild($e_Code);
161 $e_Value = $ccr->createElement('Value', 'Test 01 Code');
162 $e_Code->appendChild($e_Value);
164 $e_Description = $ccr->createElement('Description' );
165 $e_TestResult->appendChild($e_Description);
167 $e_Text = $ccr->createElement('Text', $row['ankle_x_ray_interpretation']);
168 $e_Description->appendChild($e_Text);
171 if('normal' == 'normal' ) {
172 $e_NormalResult = $ccr->createElement('NormalResult','normal');
173 $e_Test->appendChild($e_NormalResult);
174 } else {
175 $e_Flag = $ccr->createElement('Flag');
176 $e_Test->appendChild($e_Flag);
178 $e_Text = $ccr->createElement('Text', $row['high']);
179 $e_Flag->appendChild($e_Text);
183 } while ($row = sqlFetchArray($result));