.inc files migration to .inc.php (#5897)
[openemr.git] / src / Events / Codes / CodeTypeInstalledEvent.php
blobfb53d9b0a4b42770a056a7994078109d2ac61a3e
1 <?php
3 /**
4 * CodeTypeInstalledEvent class is fired when a code type has been installed in the OpenEMR system. Currently it is fired
5 * during the External Data Load process for code types found in standard_tables_capture.inc.php Consumers can hook into
6 * the pre install event and post install event.
8 * @package OpenEMR
9 * @link http://www.open-emr.org
11 * @author Stephen Nielson <snielson@discoverandchange.com>
12 * @copyright Copyright (c) 2022 Discover and Change, Inc. <snielson@discoverandchange.com>
13 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
16 namespace OpenEMR\Events\Codes;
18 class CodeTypeInstalledEvent
20 /**
21 * This event is triggered before the code system is installed
23 const EVENT_INSTALLED_PRE = 'external_codes.installed.pre';
25 /**
26 * This event is triggered after the code system is installed
28 const EVENT_INSTALLED_POST = 'external_codes.installed.post';
30 /**
31 * @var string The code type system that was installed
33 private $code_type;
35 /**
36 * @var array Additional details for the specific code type that was installed.
38 private $details;
40 public function __construct($code_type, $details)
42 $this->code_type = $code_type;
43 $this->details = $details;
46 /**
47 * @return string
49 public function getCodeType(): string
51 return $this->code_type;
54 /**
55 * @param string $code_type
56 * @return CodeTypeInstalledEvent
58 public function setCodeType(string $code_type): CodeTypeInstalledEvent
60 $this->code_type = $code_type;
61 return $this;
64 /**
65 * @return array
67 public function getDetails(): array
69 return $this->details;
72 /**
73 * @param array $details
74 * @return CodeTypeInstalledEvent
76 public function setDetails(array $details): CodeTypeInstalledEvent
78 $this->details = $details;
79 return $this;