CCR Import, made changes per comments in github.
[openemr.git] / templates / documents / general_view.html
blobc7a7897fac95089d514fc849c01e4dc0aa956d5c
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 // Process click on Import link.
44 function import_ccr(docid) {literal}{
45 top.restoreSession();
46 $.ajax({
47 url: "library/ajax/ccr_import_ajax.php",
48 type: "POST",
49 dataType: "html",
50 data:
52 ccr_ajax : "yes",
53 document_id : docid,
55 success: function(data){
56 alert(data);
57 top.restoreSession();
58 document.location.reload();
60 error:function(){
61 alert("failure");
63 });
64 }{/literal}
67 </script>
69 </head>
71 <table valign="top" width="100%">
72 <tr>
73 <td>
74 <a class="css_button" href="{$web_path}" onclick="top.restoreSession()"><span>{xl t='Download'}</span></a>
75 <a class="css_button" href='' onclick='return showpnotes({$file->get_id()})'><span>{xl t='Show Notes'}</span></a>
76 {$delete_string}
77 {if $file->get_ccr_type($file->get_id()) eq "CCR" and $file->get_mimetype($file->get_id()) eq "application/xml" and
78 $file->get_imported($file->get_id()) eq 0 }
79 <a class="css_button" href='javascript:' onclick='return import_ccr({$file->get_id()})'><span>{xl t='Import'}</span></a>
80 {/if}
81 </td>
82 </tr>
83 <tr>
84 <td valign="top">
85 {if !$hide_encryption}
86 <div class="text">
87 <form method="post" name="document_encrypt" action="{$web_path}" onsubmit="return top.restoreSession()">
88 <div>
89 <div style="float:left">
90 <b>{xl t='Encryption'}</b>&nbsp;
91 </div>
92 <div style="float:none">
93 <a href="javascript:;" onclick="submitNonEmpty( document.forms['document_encrypt'] );">(<span>{xl t='download encrypted file'})</span></a>
94 </div>
95 </div>
96 <div>
97 {xl t='Pass Phrase'}:
98 <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=''/>
99 <input type="hidden" name="encrypted" value="true"></input>
100 </div>
101 </form>
102 </div>
103 <br/>
104 {/if}
105 <div class="text">
106 <form method="post" name="document_validate" action="{$VALIDATE_ACTION}" onsubmit="return top.restoreSession()">
107 <div>
108 <div style="float:left">
109 <b>{xl t='Sha-1 Hash'}:</b>&nbsp;
110 <i>{$file->get_hash()}</i>&nbsp;
111 </div>
112 <div style="float:none">
113 <a href="javascript:;" onclick="document.forms['document_validate'].submit();">(<span>{xl t='validate'})</span></a>
114 </div>
115 </div>
116 </form>
117 </div>
118 <br/>
119 <div class="text">
120 <form method="post" name="document_update" action="{$UPDATE_ACTION}" onsubmit="return top.restoreSession()">
121 <div>
122 <div style="float:left">
123 <b>{xl t='Update'}</b>&nbsp;
124 </div>
125 <div style="float:none">
126 <a href="javascript:;" onclick="document.forms['document_update'].submit();">(<span>{xl t='submit'})</span></a>
127 </div>
128 </div>
129 <div>
130 {xl t='Rename'}:
131 <input type='text' size='20' name='docname' id='docname' value='{$file->get_url_web()}'/>
132 </div>
133 <div>
134 {xl t='Date'}:
135 <input type='text' size='10' name='docdate' id='docdate'
136 value='{$DOCDATE}' title='{xl t='yyyy-mm-dd document date'}'
137 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
138 <img src='interface/pic/show_calendar.gif' id='img_docdate' align='absbottom'
139 width='24' height='22' border='0' alt='[?]' style='cursor:pointer'
140 title='{xl t='Click here to choose a date'}' />
141 <select name="issue_id">{$ISSUES_LIST}</select>
142 </div>
143 </form>
144 </div>
146 <br/>
148 <div class="text">
149 <form method="post" name="document_move" action="{$MOVE_ACTION}" onsubmit="return top.restoreSession()">
150 <div>
151 <div style="float:left">
152 <b>{xl t='Move'}</b>&nbsp;
153 </div>
154 <div style="float:none">
155 <a href="javascript:;" onclick="document.forms['document_move'].submit();">(<span>{xl t='submit'})</span></a>
156 </div>
157 </div>
159 <div>
160 <select name="new_category_id">{$tree_html_listbox}</select>&nbsp;
161 {xl t='Move to Patient'} # <input type="text" name="new_patient_id" size="4" />
162 <a href="javascript:{literal}{}{/literal}"
163 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');">
164 <img src="images/stock_search-16.png" border="0" /></a>
165 <input type="hidden" name="new_patient_name" value="" />
166 </div>
167 </form>
168 </div>
170 <br/>
172 <form name="notes" method="post" action="{$NOTE_ACTION}" onsubmit="return top.restoreSession()">
173 <div class="text">
174 <div>
175 <div style="float:left">
176 <b>{xl t='Notes'}</b>&nbsp;
177 </div>
178 <div style="float:none">
179 <a href="javascript:;" onclick="document.forms['notes'].submit();">(<span>{xl t='add'}</span>)</a>
180 </div>
181 <div>
182 <textarea cols="53" rows="8" wrap="virtual" name="note" style="width:100%"></textarea><br>
183 <input type="hidden" name="process" value="{$PROCESS}" />
184 <input type="hidden" name="foreign_id" value="{$file->get_id()}" />
186 {if $notes}
187 <div style="margin-top:7px">
188 {foreach name=note_loop from=$notes item=note}
189 <div>
190 {xl t='Note'} #{$note->get_id()}
191 {xl t='Date:'} {$note->get_date()}
192 {$note->get_note()}
193 {if $note->get_owner()}
194 &nbsp;-{user_info id=$note->get_owner()}
195 {/if}
196 </div>
197 {/foreach}
198 {/if}
199 </div>
200 </div>
201 </div>
202 </form>
204 </td>
205 </tr>
206 <tr>
207 <td>
208 <div class="text"><b>{xl t='Content'}</b></div>
209 {if $file->get_mimetype() eq "image/tiff"}
210 <embed frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=false"></embed>
211 {elseif $file->get_mimetype() eq "image/png" or
212 $file->get_mimetype() eq "image/jpg" or
213 $file->get_mimetype() eq "image/jpeg" or
214 $file->get_mimetype() eq "image/gif" or
215 $file->get_mimetype() eq "application/pdf" }
216 <iframe frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=false"></iframe>
217 {elseif $file->get_ccr_type($file->get_id()) ne "CCR" and
218 $file->get_ccr_type($file->get_id()) ne "CCD"}
219 <iframe frameborder="0" type="{$file->get_mimetype()}" src="{$web_path}as_file=true"></iframe>
220 {/if}
221 </td>
222 </tr>
223 </table>
224 <script language='JavaScript'>
225 Calendar.setup({literal}{{/literal}inputField:"docdate", ifFormat:"%Y-%m-%d", button:"img_docdate"{literal}}{/literal});
226 </script>