<commit_before><h1 class="badge">Episodes and events</h1>

<div class="box content">
	<div class="row">

		<?php if ($this->patient->isDeceased()) {?>
			<div id="deceased-notice" class="alert-box alert with-icon">
				This patient is deceased (<?php echo $this->patient->NHSDate('date_of_death'); ?>)
			</div>
		<?php }?>

		<?php $this->renderPartial('//patient/episodes_sidebar');?>

		<div class="large-10 column event <?php echo $this->moduleNameCssClass;?> <?php echo $this->moduleStateCssClass; ?>">

			<?php $this->renderPartial('//patient/event_tabs')?>

			<div class="event-content" id="event-content">

				<h2 class="event-title"><?php echo $this->title?></h2>

				<?php $this->renderPartial('//base/_messages'); ?>

				<?php
				if($this->action->id == 'view'){?>
					<div class="row data-row">
						<div class="large-2 column">
							<div class="data-label"><?php echo $this->event->getAttributeLabel( 'event_date') ?>:</div>
						</div>
						<div class="large-10 column">
							<div class="data-value"><?php echo $this->event->NHSDate('event_date') ?></div>
						</div>
					</div>
				<?php } ?>
					<?php echo $content; ?>
					<?php if ($this->action->id == 'view') {
						$this->renderEventMetadata();
					} ?>
			</div>
		</div>
	</div>
</div><commit_msg>[OE-4103] -  Refactored based on -> Should only be displayed on event view if different from event creation date<commit_after><h1 class="badge">Episodes and events</h1>

<div class="box content">
	<div class="row">

		<?php if ($this->patient->isDeceased()) {?>
			<div id="deceased-notice" class="alert-box alert with-icon">
				This patient is deceased (<?php echo $this->patient->NHSDate('date_of_death'); ?>)
			</div>
		<?php }?>

		<?php $this->renderPartial('//patient/episodes_sidebar');?>

		<div class="large-10 column event <?php echo $this->moduleNameCssClass;?> <?php echo $this->moduleStateCssClass; ?>">

			<?php $this->renderPartial('//patient/event_tabs')?>

			<div class="event-content" id="event-content">

				<h2 class="event-title"><?php echo $this->title?></h2>

				<?php $this->renderPartial('//base/_messages'); ?>

				<?php
				if($this->action->id == 'view'){
					if($this->event->isEventDateDifferentFromCreated()){?>
					<div class="row data-row">
						<div class="large-2 column" style="margin-left: 10px;">
							<div class="data-label"><?php echo $this->event->getAttributeLabel( 'event_date') ?>:</div>
						</div>
						<div class="large-9 column end">
							<div class="data-value"><?php echo $this->event->NHSDate('event_date') ?></div>
						</div>
					</div>
		<?php 		}
				}
				echo $content;
				if ($this->action->id == 'view') {
						$this->renderEventMetadata();
				} ?>
			</div>
		</div>
	</div>
</div>
{'fraction_non_alphanumeric': 0.22056686046511628, 'fraction_numerical': 0.008357558139534883, 'mean_word_length': 3.626890756302521, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 120, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2001278', 'n_tokens_mistral': 1134, 'n_tokens_neox': 929, 'n_words': 193}