fix: invoiced field position, medical department field corrected in query
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
index b8a400c..ac35acc 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.json
@@ -39,9 +39,9 @@
   "section_break_16",
   "mode_of_payment",
   "billing_item",
+  "invoiced",
   "column_break_2",
   "paid_amount",
-  "invoiced",
   "ref_sales_invoice",
   "section_break_3",
   "referring_practitioner",
@@ -348,7 +348,7 @@
   }
  ],
  "links": [],
- "modified": "2020-04-27 21:36:06.404062",
+ "modified": "2020-05-21 03:04:21.400893",
  "modified_by": "Administrator",
  "module": "Healthcare",
  "name": "Patient Appointment",
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
index 9eb6e77..512fb48 100755
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
@@ -447,7 +447,7 @@
 		"""
 			SELECT
 				t.therapy_type, t.name, t.parent, e.practitioner,
-				e.encounter_date, e.therapy_plan, e.visit_department
+				e.encounter_date, e.therapy_plan, e.medical_department
 			FROM
 				`tabPatient Encounter` e, `tabTherapy Plan Detail` t
 			WHERE