From bdf69ba85aa6c3959a1aa0b4dad5261220bd7eba Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Wed, 15 Mar 2006 23:44:04 +0000 Subject: [PATCH] added ability to delete documents --- controllers/C_Document.class.php | 16 ++++++++++++++-- interface/patient_file/deleter.php | 18 +++++++++++++++--- templates/documents/general_view.html | 19 ++++++++++++++++++- 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/controllers/C_Document.class.php b/controllers/C_Document.class.php index aa966b1e1..e7cd9efb3 100644 --- a/controllers/C_Document.class.php +++ b/controllers/C_Document.class.php @@ -134,7 +134,10 @@ class C_Document extends Controller { } function view_action($patient_id="",$doc_id) { - + // Added by Rod to support document delete: + global $gacl_object, $phpgacl_location; + require_once(dirname(__FILE__) . "/../library/acl.inc"); + $d = new Document($doc_id); $n = new Note(); @@ -144,7 +147,16 @@ class C_Document extends Controller { $this->assign("web_path", $this->_link("retrieve") . "document_id=" . $d->get_id() . "&"); $this->assign("NOTE_ACTION",$this->_link("note")); $this->assign("MOVE_ACTION",$this->_link("move") . "document_id=" . $d->get_id() . "&process=true"); - + + // Added by Rod to support document delete: + $delete_string = ''; + if (acl_check('admin', 'super')) { + $delete_string = "(Delete this document)"; + } + $this->assign("delete_string", $delete_string); + $this->assign("REFRESH_ACTION",$this->_link("list")); + $this->assign("notes",$notes); $this->_last_node = null; diff --git a/interface/patient_file/deleter.php b/interface/patient_file/deleter.php index 2b9712efb..1bbb757db 100644 --- a/interface/patient_file/deleter.php +++ b/interface/patient_file/deleter.php @@ -1,5 +1,5 @@ + // Copyright (C) 2005, 2006 Rod Roark // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -13,6 +13,7 @@ $patient = $_REQUEST['patient']; $encounter = $_REQUEST['encounter']; $issue = $_REQUEST['issue']; + $document = $_REQUEST['document']; $info_msg = ""; @@ -57,7 +58,7 @@ ?> -<? xl('Delete Patient, Encounter or Issue','e'); ?> +<? xl('Delete Patient, Encounter, Issue or Document','e'); ?>