Index: /main/waeup.uniben/trunk/src/waeup/uniben/hostels/tests.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/hostels/tests.py	(revision 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/hostels/tests.py	(revision 17542)
@@ -47,7 +47,7 @@
         self.student['accommodation'].addBedTicket(bedticket)
         self.app[
-            'hostels']['hall-x']['hall_block_room_bed'].owner = self.student_id
+            'hostels']['hall-x']['hall-x_block_room_bed'].owner = self.student_id
         notify(grok.ObjectModifiedEvent(
-            self.app['hostels']['hall-x']['hall_block_room_bed']))
+            self.app['hostels']['hall-x']['hall-x_block_room_bed']))
         results = cat.searchResults(owner=(self.student_id, self.student_id))
         self.assertEqual(len(results), 1)
@@ -58,5 +58,5 @@
         self.browser.open(self.container_path + '/releaseexpired')
         self.assertTrue(
-            'Successfully released beds: hall_block_room_bed (B1000000)'
+            'Successfully released beds: hall-x_block_room_bed (B1000000)'
             in self.browser.contents)
         results = cat.searchResults(owner=(self.student_id, self.student_id))
@@ -65,5 +65,5 @@
             '-- booking expired (2015-10-14 08:35:38 WAT) --')
         self.assertEqual(
-            self.app['hostels']['hall-x']['hall_block_room_bed'].owner,
+            self.app['hostels']['hall-x']['hall-x_block_room_bed'].owner,
             NOT_OCCUPIED)
         # Releasing is logged.
@@ -71,5 +71,5 @@
         self.assertTrue(
             'hostels.browser.ReleaseExpiredAllocationsPage - hostels - '
-            'released: hall_block_room_bed (B1000000)'
+            'released: hall-x_block_room_bed (B1000000)'
             in logcontent)
         return
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py	(revision 17542)
@@ -142,4 +142,10 @@
         )
 
+    medical_clearance_fee = schema.Float(
+        title = _(u'Medical Clearance 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 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 17542)
@@ -263,11 +263,10 @@
 Dear %s,
 <br /><br /><br />
-You are invited for your physical clearance on:
+You are invited for your Health Centre clearance on:
 <br /><br />
 <strong>%s</strong>.
 <br /><br />
-Please bring along this letter of invitation to the University Main Auditorium
-<br /><br />
-on your clearance date.
+Please bring along your downloaded Health Centre Form to the University Health Centre
+on your Health Centre clearance date.
 <br /><br /><br />
 Signed,
@@ -295,4 +294,66 @@
             omit_fields=self.omit_fields,
             note=self.note)
+
+class ExportMedicalExaminationSlip(UtilityView, grok.View):
+    """Deliver an .
+
+    This form page is available only in Uniben.
+    """
+    grok.context(ICustomStudent)
+    grok.name('medical_examination_slip.pdf')
+    grok.require('waeup.viewStudent')
+    prefix = 'form'
+
+    label = u'Uniben Medical Examination Form'
+
+    omit_fields = (
+        'suspended',
+        'adm_code', 'suspended_comment',
+        'current_level',
+        'department', 'current_mode',
+        'entry_session', 'matric_number',
+        'flash_notice', 'parents_email',
+        'faculty', 'department')
+
+    form_fields = grok.AutoFields(ICustomStudentPersonal).select(
+        'marit_stat', 'perm_address', 'next_kin_phone')
+    form_fields['perm_address'].custom_widget = BytesDisplayWidget
+
+    def _medicalClearancePaymentMade(self, student, session):
+        if len(student['payments']):
+            for ticket in student['payments'].values():
+                if ticket.p_state == 'paid' and \
+                    ticket.p_category == 'medical_clearance' and \
+                    ticket.p_session == session:
+                    return True
+        return False
+
+    def update(self):
+        if self.context.student.state != CLEARED \
+            or not  self.context.student.physical_clearance_date:
+            self.flash(_('Forbidden'), type="warning")
+            self.redirect(self.url(self.context))
+        if not self._medicalClearancePaymentMade(
+            self.context, self.context.current_session):
+            self.flash('Please pay medical clearance fee first.',
+                type="warning")
+            self.redirect(self.url(self.context))
+        return
+
+    def render(self):
+        studentview = StudentBasePDFFormPage(self.context.student,
+            self.request, self.omit_fields)
+        students_utils = getUtility(IStudentsUtils)
+        file_path = os.path.join(
+            os.path.dirname(__file__), 'static', 'medical_examination_form.pdf')
+        file = open(file_path, 'rb')
+        mergefiles = [file,]
+        return students_utils.renderPDF(
+            self, 'medical_examination_slip',
+            self.context.student, studentview,
+            omit_fields=self.omit_fields,
+            mergefiles=mergefiles,
+            )
+
 
 class ExportExaminationScheduleSlip(UtilityView, grok.View):
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 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 17542)
@@ -230,5 +230,5 @@
         self.assertTrue('Clearance has been requested'
             in self.browser.contents)
-        # Now student can export physical_clearance.slip
+        # Now student can export physical_clearance_slip
         self.app['configuration'].name = u'University of Benin'
         self.student.physical_clearance_date = u'January 5th, 2015'
@@ -240,4 +240,34 @@
         open(path, 'wb').write(self.browser.contents)
         print "Sample PDF clearance_invitation_slip.pdf written to %s" % path
+
+    def test_medical_examination_slip(self):
+        # Student can export medical_examination_slip
+        self.app['configuration']['2004'].medical_clearance_fee = 1000.0
+        self.app['configuration'].name = u'University of Benin'
+        IWorkflowState(self.student).setState('cleared')
+        self.student.perm_address = u'My Address in Nigeria'
+        self.student.physical_clearance_date = u'January 5th, 2015'
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.open(self.clearance_path)
+        self.browser.getLink("Download medical examination slip").click()
+        self.assertTrue('Please pay medical clearance fee first' in
+            self.browser.contents)
+        self.browser.open(self.payments_path)
+        self.browser.getLink("Add current session payment ticket").click()
+        self.browser.getControl(name="form.p_category").value = ['medical_clearance']
+        self.browser.getControl("Create ticket").click()
+        p_ticket = self.student['payments'].values()[0]
+        p_ticket.approveStudentPayment()
+        self.browser.open(self.clearance_path)
+        self.browser.getLink("Download medical examination slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'medical_examination_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF medical_examination_slip.pdf written to %s" % path
+
         # Students can open the personal edit page and see the parent_email field.
         self.browser.open(self.student_path + '/edit_personal')
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 17542)
@@ -19,5 +19,5 @@
 import grok
 from zope.component import getUtility
-from waeup.kofa.interfaces import REQUESTED, REGISTERED, IExtFileStore
+from waeup.kofa.interfaces import REQUESTED, REGISTERED, CLEARED, IExtFileStore
 from waeup.kofa.browser.viewlets import ManageActionButton
 from waeup.kofa.students.interfaces import IStudentsUtils
@@ -136,4 +136,20 @@
         return False
 
+class MadicalExaminationSlipActionButton(ManageActionButton):
+    grok.order(6)
+    grok.context(ICustomStudent)
+    grok.view(StudentClearanceDisplayFormPage)
+    grok.require('waeup.viewStudent')
+    icon = 'actionicon_pdf.png'
+    text = _('Download medical examination slip')
+    target = 'medical_examination_slip.pdf'
+
+    @property
+    def target_url(self):
+        if self.context.student.state == CLEARED \
+            and self.context.student.physical_clearance_date:
+            return self.view.url(self.view.context, self.target)
+        return False
+
 class ExaminationScheduleSlipActionButton(ManageActionButton):
     grok.order(10)
Index: /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 17541)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 17542)
@@ -95,4 +95,5 @@
         'plag_test':'Final Year Plagiarism Test',
         'flc_modules': 'FLC Modules Fee',
+        'medical_clearance': 'Medical Clearance Fee',
         }
 
@@ -118,4 +119,5 @@
         'plag_test':'Final Year Plagiarism Test (for final year project or PG thesis)',
         'flc_modules': 'FLC Modules Fee',
+        'medical_clearance': 'Medical Clearance Fee',
         }
 
