fix: duplicate filters added on patient change
diff --git a/erpnext/healthcare/page/patient_history/patient_history.html b/erpnext/healthcare/page/patient_history/patient_history.html
index deaaa97..be486c6 100644
--- a/erpnext/healthcare/page/patient_history/patient_history.html
+++ b/erpnext/healthcare/page/patient_history/patient_history.html
@@ -10,7 +10,7 @@
 			<div id="chart" class="col-sm-12 patient_vital_charts">
 			</div>
 		</div>
-		<div class="col-sm-12 d-flex border-bottom py-3"></div>
+		<div class="header-separator col-sm-12 d-flex border-bottom py-3" style="display:none"></div>
 		<div class="row">
 			<div class="col-sm-12 d-flex">
 				<div class="patient-history-filter doctype-filter"></div>
diff --git a/erpnext/healthcare/page/patient_history/patient_history.js b/erpnext/healthcare/page/patient_history/patient_history.js
index 05c5190..54343aa 100644
--- a/erpnext/healthcare/page/patient_history/patient_history.js
+++ b/erpnext/healthcare/page/patient_history/patient_history.js
@@ -10,6 +10,7 @@
 	frappe.breadcrumbs.add('Healthcare');
 	let pid = '';
 	page.main.html(frappe.render_template('patient_history', {}));
+	page.main.find('.header-separator').hide();
 
 	let patient = frappe.ui.form.make_control({
 		parent: page.main.find('.patient'),
@@ -96,6 +97,7 @@
 };
 
 let setup_filters = function(patient, me) {
+	$('.doctype-filter').empty();
 	frappe.xcall(
 		'erpnext.healthcare.page.patient_history.patient_history.get_patient_history_doctypes'
 	).then(document_types => {
@@ -123,6 +125,7 @@
 		});
 		doctype_filter.refresh();
 
+		$('.date-filter').empty();
 		let date_range_field = frappe.ui.form.make_control({
 			df: {
 				fieldtype: 'DateRange',
@@ -389,9 +392,11 @@
 						formatTooltipY: d => d + ' ' + pts,
 					}
 				});
+				me.page.main.find('.header-separator').show();
 			} else {
 				me.page.main.find('.patient_vital_charts').html('');
 				me.page.main.find('.show_chart_btns').html('');
+				me.page.main.find('.header-separator').hide();
 			}
 		}
 	});