<!-- Edit this file to change the layout of the detail view print preview page -->


<div class="panel-heading"><h3 class="panel-title">
	<strong><%%DETAIL_VIEW_TITLE%%></strong>
	<div class="hidden-print pull-right">
		<div class="btn-group">
			<button type="button" id="print" onclick="window.print();" title="<%%TRANSLATION(Print)%%>" class="btn btn-primary"><i class="glyphicon glyphicon-print"></i> <%%TRANSLATION(Print)%%></button>
			<button type="submit" id="back" title="<%%TRANSLATION(Cancel Printing)%%>" class="btn btn-default"><i class="glyphicon glyphicon-remove-circle"></i> <%%TRANSLATION(Cancel Printing)%%></button>
		</div>
	</div>
	<div class="clearfix"></div>
</h3></div>

<div class="panel-body">
	<fieldset class="form-horizontal">
		<!-- Field: ID -->
		<div class="form-group patients-id" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">ID</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(id)%%></div>
			</div>
		</div>
		<!-- Field: Last name -->
		<div class="form-group patients-last_name" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Last name</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(last_name)%%></div>
			</div>
		</div>
		<!-- Field: First name -->
		<div class="form-group patients-first_name" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">First name</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(first_name)%%></div>
			</div>
		</div>
		<!-- Field: Gender -->
		<div class="form-group patients-gender" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Gender</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(gender)%%></div>
			</div>
		</div>
		<!-- Field: Sexual orientation -->
		<div class="form-group patients-sexual_orientation" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Sexual orientation</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(sexual_orientation)%%></div>
			</div>
		</div>
		<!-- Field: Birth date -->
		<div class="form-group patients-birth_date" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Birth date</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(birth_date)%%></div>
			</div>
		</div>
		<!-- Field: Age -->
		<div class="form-group patients-age" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Age</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(age)%%></div>
			</div>
		</div>
		<!-- Field: Image -->
		<div class="form-group patients-image" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Image</label>
			<div class="col-xs-9">
				<div class="form-control-static"><script>
				var imageSrc1<%%RND1%%>='<%%BASE_UPLOAD_PATH%%><%%VALUE(image)%%>';
				var imageSrc2<%%RND1%%>='thumbnail.php?t=patients&f=image&i=<%%VALUE(image)%%>&v=dv'
			</script>
			<a href="#" onclick="$j('#imageImg<%%RND1%%>').attr('src', ($j('#imageImg<%%RND1%%>').attr('src').search(/thumbnail\.php/) != -1 && imageSrc1<%%RND1%%> != '<%%BASE_UPLOAD_PATH%%>' ? imageSrc1<%%RND1%%> : imageSrc2<%%RND1%%>)); return false;"><img id="imageImg<%%RND1%%>" src="thumbnail.php?t=patients&f=image&i=<%%VALUE(image)%%>&v=dv" class="img-thumbnail"></a></div>
			</div>
		</div>
		<!-- Field: State -->
		<div class="form-group patients-state" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">State</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(state)%%></div>
			</div>
		</div>
		<!-- Field: Mobile -->
		<div class="form-group patients-mobile" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Mobile</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(mobile)%%></div>
			</div>
		</div>
		<!-- Field: Tobacco usage -->
		<div class="form-group patients-tobacco_usage" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Tobacco usage</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(tobacco_usage)%%></div>
			</div>
		</div>
		<!-- Field: Alcohol Intake -->
		<div class="form-group patients-alcohol_intake" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Alcohol Intake</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(alcohol_intake)%%></div>
			</div>
		</div>
		<!-- Field: History -->
		<div class="form-group patients-history" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">History</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(history)%%></div>
			</div>
		</div>
		<!-- Field: Surgical history -->
		<div class="form-group patients-surgical_history" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Surgical history</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(surgical_history)%%></div>
			</div>
		</div>
		<!-- Field: Obstetric history -->
		<div class="form-group patients-obstetric_history" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Obstetric history</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(obstetric_history)%%></div>
			</div>
		</div>
		<!-- Field: Genetic diseases -->
		<div class="form-group patients-genetic_diseases" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Genetic diseases</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(genetic_diseases)%%></div>
			</div>
		</div>
		<!-- Field: Contact person in case of Emergency -->
		<div class="form-group patients-contact_person" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Contact person in case of Emergency</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(contact_person)%%></div>
			</div>
		</div>
		<!-- Field: Other details -->
		<div class="form-group patients-other_details" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Other details</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(other_details)%%></div>
			</div>
		</div>
		<!-- Field: Comments -->
		<div class="form-group patients-comments" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Comments</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(comments)%%></div>
			</div>
		</div>
		<!-- Field: Filed -->
		<div class="form-group patients-filed" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Filed</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(filed)%%></div>
			</div>
		</div>
		<!-- Field: Last modified -->
		<div class="form-group patients-last_modified" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Last modified</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(last_modified)%%></div>
			</div>
		</div>
	</fieldset>
</div>
<script>
	$j(function() {
		// render read-only checkboxes in DVP
		$j('form input[type=checkbox]:not(.hidden):checked')
			.addClass('hidden')
			.after('<i class="glyphicon glyphicon-check"></i>');
		$j('form input[type=checkbox]:not(.hidden):not(:checked)')
			.addClass('hidden')
			.after('<i class="glyphicon glyphicon-unchecked"></i>')
	})
</script>
<!-- child records -->
<div class="panel-body">
	<div id="patients-children"></div>
</div>

<script>
	$j(function() {
		/* prevent loading child records in multiple DVP */
		if($j('[id=patients-children]').length > 1) return;

		post(
			'parent-children.php', {
				ParentTable: 'patients',
				SelectedID: '<%%VALUE(id)%%>',
				Operation: 'show-children-printable'
			},
			'patients-children',
			'disable-element',
			'loading-element',
			apply_persisting_children
		);

		$j('form').on('click', '#children-tabs button[data-target]', function() {
			$j(this).toggleClass('active');
			persist_expanded_child($j(this).attr('id'));
		});
	})
</script>

