Housekeeping stuff:
[openemr.git] / ccr / createCCRHeader.php
blob7b3b4904bbe6309cec838dfb1ddfc2da0942de71
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 // ------------------------------------------------------------------------ //
27 global $pid;
29 $e_ccrDocObjID = $ccr->createElement('CCRDocumentObjectID', getUuid());
30 $e_ccr->appendChild($e_ccrDocObjID);
32 $e_Language = $ccr->createElement('Language', 'English');
33 $e_ccr->appendChild($e_Language);
35 $e_Version = $ccr->createElement('Version', 'V1.0');
36 $e_ccr->appendChild($e_Version);
38 $e_dateTime = $ccr->createElement('DateTime');
39 $e_ccr->appendChild($e_dateTime);
41 $e_ExactDateTime = $ccr->createElement('ExactDateTime', date('Y-m-d\TH:i:s\Z'));
42 $e_dateTime->appendChild($e_ExactDateTime);
44 $e_patient = $ccr->createElement('Patient');
45 $e_ccr->appendChild($e_patient);
47 //$e_ActorID = $ccr->createElement('ActorID', $row['patient_id']);
48 $e_ActorID = $ccr->createElement('ActorID', $pid);
49 $e_patient->appendChild($e_ActorID);
51 //Header From:
52 $e_From = $ccr->createElement('From');
53 $e_ccr->appendChild($e_From);
55 $e_ActorLink = $ccr->createElement('ActorLink');
56 $e_From->appendChild($e_ActorLink);
58 $e_ActorID = $ccr->createElement('ActorID', $authorID );
59 $e_ActorLink->appendChild($e_ActorID);
61 $e_ActorRole = $ccr->createElement('ActorRole');
62 $e_ActorLink->appendChild($e_ActorRole);
64 $e_Text = $ccr->createElement('Text', 'author');
65 $e_ActorRole->appendChild($e_Text);
67 //Header To:
68 $e_To = $ccr->createElement('To');
69 $e_ccr->appendChild($e_To);
71 $e_ActorLink = $ccr->createElement('ActorLink');
72 $e_To->appendChild($e_ActorLink);
74 //$e_ActorID = $ccr->createElement('ActorID', $row['patient_id']);
75 $e_ActorID = $ccr->createElement('ActorID', $pid);
76 $e_ActorLink->appendChild($e_ActorID);
78 $e_ActorRole = $ccr->createElement('ActorRole');
79 $e_ActorLink->appendChild($e_ActorRole);
81 $e_Text = $ccr->createElement('Text', 'patient');
82 $e_ActorRole->appendChild($e_Text);
84 //Header Purpose:
85 $e_Purpose = $ccr->createElement('Purpose');
86 $e_ccr->appendChild($e_Purpose);
88 $e_Description = $ccr->createElement('Description');
89 $e_Purpose->appendChild($e_Description);
91 $e_Text = $ccr->createElement('Text', 'Summary of patient information');
92 $e_Description->appendChild($e_Text);