def patient_rheader(r, tabs=[]):
 if (r.representation == 'html'):
  if (r.record is None):
   return None
  table = db.patient_patient
  rheader_tabs = s3_rheader_tabs(r, tabs)
  patient = r.record
  if patient.person_id:
   name = s3_fullname(patient.person_id)
  else:
   name = None
  if patient.country:
   country = table.country.represent(patient.country)
  else:
   country = None
  if patient.hospital_id:
   hospital = table.hospital_id.represent(patient.hospital_id)
  else:
   hospital = None
  rheader = DIV(TABLE(TR(TH(('%s: ' % T('Patient'))), name, TH(('%s: ' % COUNTRY)), country), TR(TH(), TH(), TH(('%s: ' % T('Hospital'))), hospital)), rheader_tabs)
  return rheader
 return None

def patient_rheader ( r , tabs = [ ] ) : if ( r . representation == 'html' ) : if ( r . record is None ) : return None table = db . patient_patient rheader_tabs = s3_rheader_tabs ( r , tabs ) patient = r . record if patient . person_id : name = s3_fullname ( patient . person_id ) else : name = None if patient . country : country = table . country . represent ( patient . country ) else : country = None if patient . hospital_id : hospital = table . hospital_id . represent ( patient . hospital_id ) else : hospital = None rheader = DIV ( TABLE ( TR ( TH ( ( '%s: ' % T ( 'Patient' ) ) ) , name , TH ( ( '%s: ' % COUNTRY ) ) , country ) , TR ( TH ( ) , TH ( ) , TH ( ( '%s: ' % T ( 'Hospital' ) ) ) , hospital ) ) , rheader_tabs ) return rheader return None
resource page header .