updated version.php database counter for prior commit
[openemr.git] / templates / documents / general_view.html
blob801cf7c6376deb9e54bc7a9b0abaa232f4a5dcb5
1 <head>
2 <style type="text/css">@import url(library/dynarch_calendar.css);</style>
3 <script type="text/javascript" src="library/dialog.js"></script>
4 <script type="text/javascript" src="library/textformat.js"></script>
5 <script type="text/javascript" src="library/dynarch_calendar.js"></script>
6 {php} include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); {/php}
7 <script type="text/javascript" src="library/dynarch_calendar_setup.js"></script>
8 <script type="text/javascript" src="library/js/jquery-1.9.1.min.js"></script>
9 <script language="JavaScript">
10 var mypcc = '{php} echo $GLOBALS['phone_country_code'] {/php}';
12 // Process click on Delete link.
13 function deleteme(docid) {literal}{{/literal}
14 dlgopen('interface/patient_file/deleter.php?document=' + docid, '_blank', 500, 450);
15 return false;
16 {literal}}{/literal}
18 // Called by the deleter.php window on a successful delete.
19 function imdeleted() {literal}{{/literal}
20 top.restoreSession();
21 window.location.href='{$REFRESH_ACTION}';
22 {literal}}{/literal}
24 // Called to show patient notes related to this document in the "other" frame.
25 function showpnotes(docid) {literal}{{/literal}
26 {php} if ($GLOBALS['concurrent_layout']) { {/php}
27 var othername = (window.name == 'RTop') ? 'RBot' : 'RTop';
28 parent.left_nav.forceDual();
29 parent.left_nav.setRadio(othername, 'pno');
30 parent.left_nav.loadFrame('pno1', othername, 'patient_file/summary/pnotes.php?docid=' + docid);
31 {php} } {/php}
32 return false;
33 {literal}}{/literal}
35 function submitNonEmpty( e ) {literal}{{/literal}
36 if ( e.elements['passphrase'].value.length == 0 ) {literal}{{/literal}
37 alert( "{xl t='You must enter a pass phrase to encrypt the document'}" );
38 {literal}}{/literal} else {literal}{{/literal}
39 e.submit();
40 {literal}}{/literal}
41 {literal}}{/literal}
43 // For tagging it encounter
44 function tagUpdate() {literal}{{/literal}
45 var f = document.forms['document_tag'];
46 if (f.encounter_check.checked) {literal}{{/literal}
47 if(f.visit_category_id.value==0) {literal}{{/literal}
48 alert(" {xl t='Please select visit category'}" );
49 return false;
50 {literal}}{/literal}
51 {literal}}{/literal} else if (f.encounter_id.value == 0 ) {literal}{{/literal}
52 alert(" {xl t='Please select encounter'}");
53 return false;
54 {literal}}{/literal}
55 //top.restoreSession();
56 document.forms['document_tag'].submit();
57 {literal}}{/literal}
59 // For new or existing encounter
60 function set_checkbox() {literal}{{/literal}
61 var f = document.forms['document_tag'];
62 if (f.encounter_check.checked) {literal}{{/literal}
63 f.encounter_id.disabled = true;
64 f.visit_category_id.disabled = false;
65 {literal}}{/literal} else {literal}{{/literal}
66 f.encounter_id.disabled = false;
67 f.visit_category_id.disabled = true;
68 f.visit_category_id.value = 0;
69 {literal}}{/literal}
70 {literal}}{/literal}
72 // Process click on Import link.
73 function import_ccr(docid) {literal}{
74 top.restoreSession();
75 $.ajax({
76 url: "library/ajax/ccr_import_ajax.php",
77 type: "POST",
78 dataType: "html",
79 data:
81 ccr_ajax : "yes",
82 document_id : docid,
84 success: function(data){
85 alert(data);
86 top.restoreSession();
87 document.location.reload();
89 error:function(){
90 alert("failure");
92 });
93 }{/literal}
96 </script>
98 </head>
100 <table valign="top" width="100%">
101 <tr>
102 <td>
103 <a class="css_button" href="{$web_path}" onclick="top.restoreSession()"><span>{xl t='Download'}</span></a>
104 <a class="css_button" href='' onclick='return showpnotes({$file->get_id()})'><span>{xl t='Show Notes'}</span></a>
105 {$delete_string}
106 {if $file->get_ccr_type($file->get_id()) eq "CCR" and ($file->get_mimetype($file->get_id()) eq "application/xml" or $file->get_mimetype($file->get_id()) eq "text/xml") and
107 $file->get_imported($file->get_id()) eq 0 }
108 <a class="css_button" href='javascript:' onclick='return import_ccr({$file->get_id()})'><span>{xl t='Import'}</span></a>
109 {/if}
110 </td>
111 </tr>
112 <tr>
113 <td valign="top">
114 {if !$hide_encryption}
115 <div class="text">
116 <form method="post" name="document_encrypt" action="{$web_path}" onsubmit="return top.restoreSession()">
117 <div>
118 <div style="float:left">
119 <b>{xl t='Encryption'}</b>&nbsp;
120 </div>
121 <div style="float:none">
122 <a href="javascript:;" onclick="submitNonEmpty( document.forms['document_encrypt'] );">(<span>{xl t='download encrypted file'})</span></a>
123 </div>
124 </div>
125 <div>
126 {xl t='Pass Phrase'}:
127 <input title="{xl t='Supports TripleDES encryption/decryption only.'} {xl t='Leaving the pass phrase blank will not encrypt the document'}" type='text' size='20' name='passphrase' id='passphrase' value=''/>
128 <input type="hidden" name="encrypted" value="true"></input>
129 </div>
130 </form>
131 </div>
132 <br/>
133 {/if}
134 <div class="text">
135 <form method="post" name="document_validate" action="{$VALIDATE_ACTION}" onsubmit="return top.restoreSession()">
136 <div>
137 <div style="float:left">
138 <b>{xl t='Sha-1 Hash'}:</b>&nbsp;
139 <i>{$file->get_hash()}</i>&nbsp;
140 </div>
141 <div style="float:none">
142 <a href="javascript:;" onclick="document.forms['document_validate'].submit();">(<span>{xl t='validate'})</span></a>
143 </div>
144 </div>
145 </form>
146 </div>
147 <br/>
148 <div class="text">
149 <form method="post" name="document_update" action="{$UPDATE_ACTION}" onsubmit="return top.restoreSession()">
150 <div>
151 <div style="float:left">
152 <b>{xl t='Update'}</b>&nbsp;
153 </div>
154 <div style="float:none">
155 <a href="javascript:;" onclick="document.forms['document_update'].submit();">(<span>{xl t='submit'})</span></a>
156 </div>
157 </div>
158 <div>
159 {xl t='Rename'}:
160 <input type='text' size='20' name='docname' id='docname' value='{$file->get_url_web()}'/>
161 </div>
162 <div>
163 {xl t='Date'}:
164 <input type='text' size='10' name='docdate' id='docdate'
165 value='{$DOCDATE}' title='{xl t='yyyy-mm-dd document date'}'
166 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
167 <img src='interface/pic/show_calendar.gif' id='img_docdate' align='absbottom'
168 width='24' height='22' border='0' alt='[?]' style='cursor:pointer'
169 title='{xl t='Click here to choose a date'}' />
170 <select name="issue_id">{$ISSUES_LIST}</select>
171 </div>
172 </form>
173 </div>
175 <br/>
177 <div class="text">
178 <form method="post" name="document_move" action="{$MOVE_ACTION}" onsubmit="return top.restoreSession()">
179 <div>
180 <div style="float:left">
181 <b>{xl t='Move'}</b>&nbsp;
182 </div>
183 <div style="float:none">
184 <a href="javascript:;" onclick="document.forms['document_move'].submit();">(<span>{xl t='submit'})</span></a>
185 </div>
186 </div>
188 <div>
189 <select name="new_category_id">{$tree_html_listbox}</select>&nbsp;
190 {xl t='Move to Patient'} # <input type="text" name="new_patient_id" size="4" />
191 <a href="javascript:{literal}{}{/literal}"
192 onclick="top.restoreSession();var URL='controller.php?patient_finder&find&form_id={"document_move['new_patient_id']"|escape:"url"}&form_name={"document_move['new_patient_name']"|escape:"url"}'; window.open(URL, 'document_move', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=450,height=400,left=425,top=250');">
193 <img src="images/stock_search-16.png" border="0" /></a>
194 <input type="hidden" name="new_patient_name" value="" />
195 </div>
196 </form>
197 </div>
199 <br/>
201 <div class="text">
202 <form method="post" name="document_tag" id="document_tag" action="{$TAG_ACTION}" onsubmit="return top.restoreSession()">
204 <div >
205 <div style="float:left">
206 <b>{xl t='Tag to Encounter'}</b>&nbsp;
207 </div>
209 <div style="float:none">
210 <a href="javascript:;" onclick="tagUpdate();">(<span>{xl t='submit'})</span></a>
211 </div>
212 </div>
214 <div>
215 <select id="encounter_id" name="encounter_id" >{$ENC_LIST}</select>&nbsp;
216 <input type="checkbox" name="encounter_check" id="encounter_check" onclick='set_checkbox(this)'/> <label for="encounter_check"><b>{xl t='Create Encounter'}</b></label>&nbsp;&nbsp;
217 {xl t='Visit Category'} : &nbsp;<select id="visit_category_id" name="visit_category_id" disabled>{$VISIT_CATEGORY_LIST}</select>&nbsp;
219 </div>
220 </form>
221 </div>
223 <br/>
225 <form name="notes" method="post" action="{$NOTE_ACTION}" onsubmit="return top.restoreSession()">
226 <div class="text">
227 <div>
228 <div style="float:left">
229 <b>{xl t='Notes'}</b>&nbsp;
230 </div>
231 <div style="float:none">
232 <a href="javascript:;" onclick="document.notes.identifier.value='no';document.forms['notes'].submit();">(<span>{xl t='add'}</span>)</a>
233 &nbsp;&nbsp;&nbsp;<b>{xl t='Email'}</b>&nbsp;
234 <input type="text" size="25" name="provide_email" id="provide_email" />
235 <input type="hidden" name="identifier" id="identifier" />
236 <a href="javascript:;" onclick="javascript:document.notes.identifier.value='yes';document.forms['notes'].submit();">
237 (<span>{xl t='Send'}</span>)
238 </a>
239 </div>
240 <div>
242 </div>
243 <div style="float:none">
245 </div>
246 <div>
247 <textarea cols="53" rows="8" wrap="virtual" name="note" style="width:100%"></textarea><br>
248 <input type="hidden" name="process" value="{$PROCESS}" />
249 <input type="hidden" name="foreign_id" value="{$file->get_id()}" />
251 {if $notes}
252 <div style="margin-top:7px">
253 {foreach name=note_loop from=$notes item=note}
254 <div>
255 {xl t='Note'} #{$note->get_id()}
256 {xl t='Date:'} {$note->get_date()}
257 {$note->get_note()}
258 {if $note->get_owner()}
259 &nbsp;-{user_info id=$note->get_owner()}
260 {/if}
261 </div>
262 {/foreach}
263 {/if}
264 </div>
265 </div>
266 </div>
267 </form>
269 </td>
270 </tr>
271 <tr>
272 <td>
273 <div class="text"><b>{xl t='Content'}</b></div>
274 {if $file->get_mimetype() eq "image/tiff"}
275 <embed frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=false"></embed>
276 {elseif $file->get_mimetype() eq "image/png" or
277 $file->get_mimetype() eq "image/jpg" or
278 $file->get_mimetype() eq "image/jpeg" or
279 $file->get_mimetype() eq "image/gif" or
280 $file->get_mimetype() eq "application/pdf" }
281 <iframe frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=false"></iframe>
282 {elseif $file->get_ccr_type($file->get_id()) ne "CCR" and
283 $file->get_ccr_type($file->get_id()) ne "CCD"}
284 <iframe frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=true"></iframe>
285 {/if}
286 </td>
287 </tr>
288 </table>
289 <script language='JavaScript'>
290 Calendar.setup({literal}{{/literal}inputField:"docdate", ifFormat:"%Y-%m-%d", button:"img_docdate"{literal}}{/literal});
291 </script>