5 * Copyright (C) 2010 Garden State Health Systems <http://www.gshsys.com/>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @author Garden State Health Systems <http://www.gshsys.com/>
20 * @link http://www.open-emr.org
24 $result = getImmunizationData();
25 $row = sqlFetchArray($result);
29 $e_Immunization = $ccr->createElement('Immunization');
30 $e_Immunizations->appendChild($e_Immunization);
32 $e_CCRDataObjectID = $ccr->createElement('CCRDataObjectID', getUuid());
33 $e_Immunization->appendChild($e_CCRDataObjectID);
35 $e_DateTime = $ccr->createElement('DateTime');
36 $e_Immunization->appendChild($e_DateTime);
38 $date = date_create($row['administered_date']);
40 $e_ExactDateTime = $ccr->createElement('ExactDateTime', $date->format('Y-m-d\TH:i:s\Z'));
41 $e_DateTime->appendChild($e_ExactDateTime);
43 $e_Type = $ccr->createElement('Type');
44 $e_Immunization->appendChild($e_Type);
46 $e_Text = $ccr->createElement('Text', 'Immunization');
47 $e_Type->appendChild($e_Text);
49 $e_Status = $ccr->createElement('Status');
50 $e_Immunization->appendChild($e_Status);
52 $e_Text = $ccr->createElement('Text','ACTIVE');
53 $e_Status->appendChild($e_Text);
55 $e_Immunization->appendChild(sourceType($ccr, $sourceID));
57 $e_Product = $ccr->createElement('Product');
58 $e_Immunization->appendChild($e_Product);
60 $e_ProductName = $ccr->createElement('ProductName');
61 $e_Product->appendChild($e_ProductName);
63 $e_Text = $ccr->createElement('Text',$row['title']);
64 $e_ProductName->appendChild( $e_Text);
66 $e_Directions = $ccr->createElement('Directions');
67 $e_Immunization->appendChild($e_Directions);
69 $e_Direction = $ccr->createElement('Direction');
70 $e_Directions->appendChild($e_Direction);
72 $e_Description = $ccr->createElement('Description');
73 $e_Direction->appendChild($e_Description);
75 $e_Text = $ccr->createElement('Text',$row['note']);
76 $e_Description->appendChild($e_Text);
78 $e_Code = $ccr->createElement('Code');
79 $e_Description->appendChild($e_Code);
81 $e_Value = $ccr->createElement('Value', 'None');
82 $e_Code->appendChild($e_Value);
84 } while ($row = sqlFetchArray($result));