2 * general document view
5 * @link http://www.open-emr.org
6 * @author Brady Miller
<brady.g.miller@gmail.com
>
7 * @copyright Copyright (c)
2017 Brady Miller
<brady.g.miller@gmail.com
>
8 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License
3
11 <script language=
"JavaScript">
13 // Process click on Delete link.
14 function deleteme(docid
) {literal
}{{/literal
}
15 dlgopen('interface/patient_file/deleter.php?document=' + docid
, '_blank', 500, 450);
19 // Called by the deleter.php window on a successful delete.
20 function imdeleted() {literal
}{{/literal
}
22 window
.location
.href
='{$REFRESH_ACTION}';
25 // Called to show patient notes related to this document in the "other" frame.
26 function showpnotes(docid
) {literal
}{{/literal
}
27 var othername
= (window
.name
== 'RTop') ? 'RBot' : 'RTop';
28 parent
.left_nav
.forceDual();
29 parent
.left_nav
.loadFrame('pno1', othername
, 'patient_file/summary/pnotes.php?docid=' + docid
);
33 function submitNonEmpty( e
) {literal
}{{/literal
}
34 if ( e
.elements
['passphrase'].value
.length
== 0 ) {literal
}{{/literal
}
35 alert( "{xl t='You must enter a pass phrase to encrypt the document'}" );
36 {literal
}}{/literal} else {literal}{{/literal}
41 // For tagging it encounter
42 function tagUpdate() {literal
}{{/literal
}
43 var f
= document
.forms
['document_tag'];
44 if (f
.encounter_check
.checked
) {literal
}{{/literal
}
45 if(f
.visit_category_id
.value
==0) {literal
}{{/literal
}
46 alert(" {xl t='Please select visit category'}" );
49 {literal
}}{/literal} else if (f.encounter_id.value == 0 ) {literal}{{/literal}
50 alert(" {xl t='Please select encounter'}");
53 //top.restoreSession();
54 document
.forms
['document_tag'].submit();
57 // For new or existing encounter
58 function set_checkbox() {literal
}{{/literal
}
59 var f
= document
.forms
['document_tag'];
60 if (f
.encounter_check
.checked
) {literal
}{{/literal
}
61 f
.encounter_id
.disabled
= true;
62 f
.visit_category_id
.disabled
= false;
63 $('.hide_clear').attr('href','javascript:void(0);');
64 {literal
}}{/literal} else {literal}{{/literal}
65 f
.encounter_id
.disabled
= false;
66 f
.visit_category_id
.disabled
= true;
67 f
.visit_category_id
.value
= 0;
68 $('.hide_clear').attr('href','{$clear_encounter_tag}');
72 // For tagging it with image procedure
73 function ImgProcedure() {literal
}{{/literal
}
74 var f
= document
.forms
['img_procedure_tag'];
75 if(f
.image_procedure_id
.value
== 0 ) {literal
}{{/literal
}
76 alert("{xl t='Please select image procedure'}");
79 f
.procedure_code
.value
= f
.image_procedure_id
.options
[f
.image_procedure_id
.selectedIndex
].getAttribute('data-code');
80 document
.forms
['img_procedure_tag'].submit();
82 // Process click on Import link.
83 function import_ccr(docid
) {literal
}{
86 url
: "library/ajax/ccr_import_ajax.php",
94 success: function(data
){
97 document
.location
.reload();
106 <table valign=
"top" width=
"100%">
109 <div style=
"margin-bottom: 6px;padding-bottom: 6px;border-bottom:3px solid gray;">
110 <h4>{$file-
>get_url_web()}
111 <div class=
"btn-group btn-toggle">
112 <button class=
"btn btn-xs btn-default properties">{xl t='Properties'}
</button>
113 <button class=
"btn btn-xs btn-primary active">{xl t='Contents'}
</button>
115 <span style=
"float:right;">
116 <a class=
"css_button" href=
"{$web_path}" title=
"{xl t='Original file'}" onclick=
"top.restoreSession()"><span>{xl t='Download'}
</span></a>
117 <a class=
"css_button" href='' onclick='return showpnotes({$file-
>get_id()})'
><span>{xl t='Show Notes'}
</span></a>
119 {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
120 $file-
>get_imported($file-
>get_id()) eq
0 }
121 <a class=
"css_button" href='javascript:' onclick='return import_ccr({$file-
>get_id()})'
><span>{xl t='Import'}
</span></a>
128 <tr id=
"DocProperties" style=
"display:none;">
130 {if !$hide_encryption}
132 <form method=
"post" name=
"document_encrypt" action=
"{$web_path}" onsubmit=
"return top.restoreSession()">
134 <div style=
"float:left">
135 <b>{xl t='Encryption'}
</b>
137 <div style=
"float:none">
138 <a href=
"javascript:;" onclick=
"submitNonEmpty( document.forms['document_encrypt'] );">(
<span>{xl t='download encrypted file'})
</span></a>
142 {xl t='Pass Phrase'}:
143 <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=''
/>
144 <input type=
"hidden" name=
"encrypted" value=
"true"></input>
151 <form method=
"post" name=
"document_validate" action=
"{$VALIDATE_ACTION}" onsubmit=
"return top.restoreSession()">
153 <div style=
"float:left">
154 <b>{xl t='Sha-
1 Hash'}:
</b>
155 <i>{$file-
>get_hash()}
</i>
157 <div style=
"float:none">
158 <a href=
"javascript:;" onclick=
"document.forms['document_validate'].submit();">(
<span>{xl t='validate'})
</span></a>
165 <form method=
"post" name=
"document_update" action=
"{$UPDATE_ACTION}" onsubmit=
"return top.restoreSession()">
167 <div style=
"float:left">
168 <b>{xl t='Update'}
</b>
170 <div style=
"float:none">
171 <a href=
"javascript:;" onclick=
"document.forms['document_update'].submit();">(
<span>{xl t='submit'})
</span></a>
176 <input type='text' size='
20' name='docname' id='docname' value='{$file-
>get_url_web()}'
/>
180 <input type='text' size='
10' class='datepicker' name='docdate' id='docdate'
181 value='{$DOCDATE}' title='{xl t='yyyy-mm-dd document date'}'
/>
182 <select name=
"issue_id">{$ISSUES_LIST}
</select>
190 <form method=
"post" name=
"document_move" action=
"{$MOVE_ACTION}" onsubmit=
"return top.restoreSession()">
192 <div style=
"float:left">
193 <b>{xl t='Move'}
</b>
195 <div style=
"float:none">
196 <a href=
"javascript:;" onclick=
"document.forms['document_move'].submit();">(
<span>{xl t='submit'})
</span></a>
201 <select name=
"new_category_id">{$tree_html_listbox}
</select>
202 {xl t='Move to Patient'} #
<input type=
"text" name=
"new_patient_id" size=
"4" />
203 <a href=
"javascript:{literal}{}{/literal}"
204 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');">
205 <img src=
"images/stock_search-16.png" border=
"0" /></a>
206 <input type=
"hidden" name=
"new_patient_name" value=
"" />
214 <form method=
"post" name=
"document_tag" id=
"document_tag" action=
"{$TAG_ACTION}" onsubmit=
"return top.restoreSession()">
217 <div style=
"float:left">
218 <b>{xl t='Tag to Encounter'}
</b>
221 <div style=
"float:none">
222 <a href=
"javascript:;" onclick=
"tagUpdate();">(
<span>{xl t='submit'})
</span></a>
227 <select id=
"encounter_id" name=
"encounter_id" >{$ENC_LIST}
</select>
228 <a href=
"{$clear_encounter_tag}" class=
"hide_clear">(
<span>{xl t='clear'})
</span></a>
229 <input type=
"checkbox" name=
"encounter_check" id=
"encounter_check" onclick='set_checkbox(this)'
/> <label for=
"encounter_check"><b>{xl t='Create Encounter'}
</b></label>
230 {xl t='Visit Category'} :
<select id=
"visit_category_id" name=
"visit_category_id" disabled
>{$VISIT_CATEGORY_LIST}
</select>
237 <form method=
"post" name=
"img_procedure_tag" id=
"img_procedure_tag" action=
"{$IMG_PROCEDURE_TAG_ACTION}" onsubmit=
"return top.restoreSession()">
238 <input type='hidden' name='procedure_code' value=''
>
240 <div style=
"float:left">
241 <b>{xl t='Tag to Image Procedure'}
</b>
243 <div style=
"float:none">
244 <a href=
"javascript:;" onclick=
"ImgProcedure();">(
<span>{xl t='submit'})
</span></a>
248 <select id=
"image_procedure_id" name=
"image_procedure_id">{$IMAGE_PROCEDURE_LIST}
</select>
249 <a href=
"{$clear_procedure_tag}">(
<span>{xl t='clear'})
</span></a>
256 <form name=
"notes" method=
"post" action=
"{$NOTE_ACTION}" onsubmit=
"return top.restoreSession()">
259 <div style=
"float:left">
260 <b>{xl t='Notes'}
</b>
262 <div style=
"float:none">
263 <a href=
"javascript:;" onclick=
"document.notes.identifier.value='no';document.forms['notes'].submit();">(
<span>{xl t='add'}
</span>)
</a>
264 <b>{xl t='Email'}
</b>
265 <input type=
"text" size=
"25" name=
"provide_email" id=
"provide_email" />
266 <input type=
"hidden" name=
"identifier" id=
"identifier" />
267 <a href=
"javascript:;" onclick=
"javascript:document.notes.identifier.value='yes';document.forms['notes'].submit();">
268 (
<span>{xl t='Send'}
</span>)
274 <div style=
"float:none">
278 <textarea cols=
"53" rows=
"8" wrap=
"virtual" name=
"note" style=
"width:100%"></textarea><br>
279 <input type=
"hidden" name=
"process" value=
"{$PROCESS}" />
280 <input type=
"hidden" name=
"foreign_id" value=
"{$file->get_id()}" />
283 <div style=
"margin-top:7px">
284 {foreach name=note_loop from=$notes item=note}
286 {xl t='Note'} #{$note-
>get_id()}
287 {xl t='Date:'} {$note-
>get_date()}
289 {if $note-
>get_owner()}
290 -{user_info id=$note-
>get_owner()}
299 <h4>{xl t='Contents'}
</h4>
302 <tr id=
"DocContents">
304 {if $file-
>get_mimetype() eq
"image/tiff"}
305 <embed frameborder=
"0" type=
"{$file->get_mimetype()}" src=
"{$web_path}as_file=false"></embed>
306 {elseif $file-
>get_mimetype() eq
"image/png" or
307 $file-
>get_mimetype() eq
"image/jpg" or
308 $file-
>get_mimetype() eq
"image/jpeg" or
309 $file-
>get_mimetype() eq
"image/gif" or
310 $file-
>get_mimetype() eq
"application/pdf" }
311 <iframe frameborder=
"0" type=
"{$file->get_mimetype()}" src=
"{$web_path}as_file=false"></iframe>
312 {elseif $file-
>get_ccr_type($file-
>get_id()) ne
"CCR" and
313 $file-
>get_ccr_type($file-
>get_id()) ne
"CCD"}
314 <iframe frameborder=
"0" type=
"{$file->get_mimetype()}" src=
"{$web_path}as_file=true"></iframe>
319 <script language='JavaScript'
>
321 $('.btn-toggle').click(function() {
322 $(this).find('.btn').toggleClass('active');
324 if ($(this).find('.btn-primary').length
>0) {
325 $(this).find('.btn').toggleClass('btn-primary');
328 $(this).find('.btn').toggleClass('btn-default');
329 var show_prop
= ($(this).find('.properties.active').length
> 0 ? 'block':'none');
330 $("#DocProperties").css('display', show_prop
);