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. //
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. //
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. //
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 = getImmunizationData();
29 $row = sqlFetchArray($result);
33 $e_Immunization = $ccr->createElement('Immunization');
34 $e_Immunizations->appendChild($e_Immunization);
36 $e_CCRDataObjectID = $ccr->createElement('CCRDataObjectID', getUuid());
37 $e_Immunization->appendChild($e_CCRDataObjectID);
39 $e_DateTime = $ccr->createElement('DateTime');
40 $e_Immunization->appendChild($e_DateTime);
42 $date = date_create($row['administered_date']);
44 $e_ExactDateTime = $ccr->createElement('ExactDateTime', $date->format('Y-m-d\TH:i:s\Z'));
45 $e_DateTime->appendChild($e_ExactDateTime);
47 $e_Type = $ccr->createElement('Type');
48 $e_Immunization->appendChild($e_Type);
50 $e_Text = $ccr->createElement('Text', 'Immunization');
51 $e_Type->appendChild($e_Text);
53 $e_Status = $ccr->createElement('Status');
54 $e_Immunization->appendChild($e_Status);
56 $e_Text = $ccr->createElement('Text','ACTIVE');
57 $e_Status->appendChild($e_Text);
59 $e_Immunization->appendChild(sourceType($ccr, $sourceID));
61 $e_Product = $ccr->createElement('Product');
62 $e_Immunization->appendChild($e_Product);
64 $e_ProductName = $ccr->createElement('ProductName');
65 $e_Product->appendChild($e_ProductName);
67 $e_Text = $ccr->createElement('Text',$row['title']);
68 $e_ProductName->appendChild( $e_Text);
70 $e_Directions = $ccr->createElement('Directions');
71 $e_Immunization->appendChild($e_Directions);
73 $e_Direction = $ccr->createElement('Direction');
74 $e_Directions->appendChild($e_Direction);
76 $e_Description = $ccr->createElement('Description');
77 $e_Direction->appendChild($e_Description);
79 $e_Text = $ccr->createElement('Text',$row['note']);
80 $e_Description->appendChild($e_Text);
82 $e_Code = $ccr->createElement('Code');
83 $e_Description->appendChild($e_Code);
85 $e_Value = $ccr->createElement('Value', 'None');
86 $e_Code->appendChild($e_Value);
88 } while ($row = sqlFetchArray($result));