Index: /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 16385)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 16386)
@@ -130,4 +130,10 @@
         )
 
+    medical_quest_fee = schema.Float(
+        title = _(u'Medical Questionnaire Fee'),
+        default = 0.0,
+        required = False,
+        )
+
     remita_enabled = schema.Bool(
         title = _(u'Remita integration enabled'),
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16385)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16386)
@@ -802,4 +802,22 @@
     pnav = 4
 
+    def _medicalQuestPaymentMade(self, student, session):
+        if len(student['payments']):
+            for ticket in student['payments'].values():
+                if ticket.p_state == 'paid' and \
+                    ticket.p_category == 'medical_quest' and \
+                    ticket.p_session == session:
+                    return True
+        return False
+
+    def update(self):
+        if not self._medicalQuestPaymentMade(
+            self.context, self.context.current_session):
+            self.flash('Please pay medical questionnaire payment first.',
+                type="warning")
+            self.redirect(self.url(self.context))
+            return
+        return super(StudentMedicalHistoryEditFormPage, self).update()
+
     @property
     def form_fields(self):
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 16385)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 16386)
@@ -1170,4 +1170,5 @@
 
     def test_student_medical_questionnaire(self):
+        self.app['configuration']['2004'].medical_quest_fee = 1000.0
         IWorkflowInfo(self.student).fireTransition('admit')
         self.browser.open(self.login_path)
@@ -1179,4 +1180,15 @@
         self.browser.getLink("Base Data").click()
         self.browser.getLink("Medical Questionnaire").click()
+        self.assertTrue('Please pay medical questionnaire payment first' in
+            self.browser.contents)
+        self.assertEqual(self.browser.url, self.student_path)
+        self.browser.open(self.payments_path)
+        self.browser.getLink("Add current session payment ticket").click()
+        self.browser.getControl(name="form.p_category").value = ['medical_quest']
+        self.browser.getControl("Create ticket").click()
+        p_ticket = self.student['payments'].values()[0]
+        p_ticket.approveStudentPayment()
+        self.browser.getLink("Base Data").click()
+        self.browser.getLink("Medical Questionnaire").click()
         self.browser.getLink("Download medical questionnaire slip").click()
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 16385)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 16386)
@@ -275,4 +275,6 @@
         elif category == 'clinexam':
             amount = academic_session.clinexam_fee
+        elif category == 'medical_quest':
+            amount = academic_session.medical_quest_fee
         elif category.startswith('pharmd') \
             and student.current_mode == 'special_ft':
Index: /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 16385)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 16386)
@@ -92,4 +92,5 @@
         'carryover':'School Fee (carry over from previous sessions)',
         'foreign':'School Fee (paid in foreign currency)',
+        'medical_quest':'Medical Questionnaire Fee',
         }
 
@@ -112,4 +113,5 @@
         'pharmd_2':'PharmD Module 1 Fee (school fee prepayment)',
         #'develop':'Development Fee',
+        'medical_quest':'Medical Questionnaire Fee',
         }
 
