fix: don't overwrite appointment duration if already specified
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index f7ed31b..2d6b645 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -226,7 +226,9 @@
primary_action_label: __('Book'),
primary_action: function() {
frm.set_value('appointment_time', selected_slot);
- frm.set_value('duration', duration);
+ if (!frm.doc.duration) {
+ frm.set_value('duration', duration);
+ }
frm.set_value('practitioner', d.get_value('practitioner'));
frm.set_value('department', d.get_value('department'));
frm.set_value('appointment_date', d.get_value('appointment_date'));