Minor translation bug fix
[openemr.git] / ccr / createCCRActor.php
blobed869f51986a294b22b37468dd80aa810cadd0b4
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 = getActorData();
29 while ($row = sqlFetchArray($result)) {
31 $e_Actor = $ccr->createElement('Actor');
32 $e_Actors->appendChild($e_Actor);
34 $e_ActorObjectID = $ccr->createElement('ActorObjectID', $row['pid']);
35 $e_Actor->appendChild($e_ActorObjectID);
37 $e_Person = $ccr->createElement('Person');
38 $e_Actor->appendChild($e_Person);
40 $e_Name = $ccr->createElement('Name');
41 $e_Person->appendChild($e_Name);
43 $e_CurrentName = $ccr->createElement('CurrentName');
44 $e_Name->appendChild($e_CurrentName);
46 $e_Given = $ccr->createElement('Given',$row['fname']);
47 $e_CurrentName->appendChild($e_Given);
49 $e_Family = $ccr->createElement('Family',$row['lname']);
50 $e_CurrentName->appendChild($e_Family);
52 $e_Suffix = $ccr->createElement('Suffix');
53 $e_CurrentName->appendChild($e_Suffix);
55 $e_DateOfBirth = $ccr->createElement('DateOfBirth');
56 $e_Person->appendChild($e_DateOfBirth);
58 $e_ExactDateTime = $ccr->createElement('ExactDateTime',$row['DOB']);
59 $e_DateOfBirth->appendChild($e_ExactDateTime);
61 $e_Gender = $ccr->createElement('Gender');
62 $e_Person->appendChild($e_Gender);
64 $e_Text = $ccr->createElement('Text',$row['sex']);
65 $e_Gender->appendChild($e_Text);
67 $e_Code = $ccr->createElement('Code');
68 $e_Gender->appendChild($e_Code);
70 $e_Value = $ccr->createElement('Value');
71 $e_Code->appendChild($e_Value);
73 $e_IDs = $ccr->createElement('IDs');
74 $e_Actor->appendChild($e_IDs);
76 $e_Type = $ccr->createElement('Type');
77 $e_IDs->appendChild($e_Type);
79 $e_Text = $ccr->createElement('Text', 'Patient ID');
80 $e_Type->appendChild($e_Text);
82 $e_ID = $ccr->createElement('ID', $row['pid']);
83 $e_IDs->appendChild($e_ID);
85 $e_Source = $ccr->createElement('Source');
86 $e_IDs->appendChild($e_Source);
88 $e_SourceActor = $ccr->createElement('Actor');
89 $e_Source->appendChild($e_SourceActor);
91 $e_ActorID = $ccr->createElement('ActorID', getUuid());
92 $e_SourceActor->appendChild($e_ActorID);
94 // address
95 $e_Address = $ccr->createElement('Address');
96 $e_Actor->appendChild($e_Address);
98 $e_Line1 = $ccr->createElement('Line1', $row['street']);
99 $e_Address->appendChild($e_Line1);
101 $e_Line2 = $ccr->createElement('Line2');
102 $e_Address->appendChild($e_Line1);
104 $e_City = $ccr->createElement('City', $row['city']);
105 $e_Address->appendChild($e_City);
107 $e_State = $ccr->createElement('State', $row['state']);
108 $e_Address->appendChild($e_State);
110 $e_PostalCode = $ccr->createElement('PostalCode', $row['postal_code']);
111 $e_Address->appendChild($e_PostalCode);
113 $e_Telephone = $ccr->createElement('Telephone');
114 $e_Actor->appendChild($e_Telephone);
116 $e_Value = $ccr->createElement('Value', $row['phone_contact']);
117 $e_Telephone->appendChild($e_Value);
124 //////// Actor Information Systems
126 $e_Actor = $ccr->createElement('Actor');
127 $e_Actors->appendChild($e_Actor);
129 $e_ActorObjectID = $ccr->createElement('ActorObjectID', $authorID);
130 $e_Actor->appendChild($e_ActorObjectID);
132 $e_InformationSystem = $ccr->createElement('InformationSystem');
133 $e_Actor->appendChild($e_InformationSystem);
135 $e_Name = $ccr->createElement('Name', ' Garden Health System v1.0');
136 $e_InformationSystem->appendChild($e_Name);
138 $e_Source = $ccr->createElement('Source');
139 $e_IDs->appendChild($e_Source);
141 $e_Actor = $ccr->createElement('Actor');
142 $e_Source->appendChild($e_Actor);
144 $e_ActorID = $ccr->createElement('ActorID', $authorID);
145 $e_Actor->appendChild($e_ActorID);