package Ġorg . simple . clin ic . summary Ċ Ċ import Ġorg . simple . clin ic . mob ius . View Renderer Ċ Ċ class ĠPatient Summary View Renderer ( ĊĠĠĠ Ġprivate Ġval Ġui : ĠPatient Summary Screen Ui , ĊĠĠĠ Ġprivate Ġval Ġmodel Update Callback : ĠPatient Summary Model Update Callback Ċ ) Ġ: ĠView Renderer < Patient Summary Model > Ġ{ ĊĊĠ Ġoverride Ġfun Ġrender ( model : ĠPatient Summary Model ) Ġ{ ĊĠĠĠ Ġmodel Update Callback ?. invoke ( model ) ĊĊĠĠĠ Ġwith ( ui ) Ġ{ ĊĠĠĠĠĠ Ġif Ġ( model . has Loaded Patient Summary Profile ) Ġ{ ĊĠĠĠĠĠĠĠ Ġpopulate Patient Profile ( model . patient Summary Profile !! ) ĊĠĠĠĠĠĠĠ Ġshow Edit Button () ĊĠĠĠĠĠĠĠ Ġsetup Ui For Assigned Facility ( model ) ĊĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠ Ġif Ġ( model . has Loaded Current Facility ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsetup Ui For Di abet es Management ( model . is Di abet es Management Enabled ) ĊĠĠĠĠĠĠĠ Ġsetup Ui For Tele consult ( model ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġsetup Ui For Assigned Facility ( model : ĠPatient Summary Model ) Ġ{ ĊĠĠĠ Ġif Ġ( model . has Assigned Facility ) Ġ{ ĊĠĠĠĠĠ Ġui . show Assigned Facility View () ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġui . hide Assigned Facility View () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġsetup Ui For Tele consult ( model : ĠPatient Summary Model ) Ġ{ ĊĠĠĠ Ġif Ġ( model . open Int ention Ġis ĠOpen Int ention . View Existing Patient With Tele consult Log ) Ġ{ ĊĠĠĠĠĠ Ġrender Medical Off icer View () ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġrender User View ( model ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġrender Medical Off icer View () Ġ{ ĊĠĠĠ Ġui . hide Tele consult Button () ĊĠĠĠ Ġui . hide Done Button () ĊĠĠĠ Ġui . show Tele consult Log Button () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġrender User View ( model : ĠPatient Summary Model ) Ġ{ ĊĠĠĠ Ġif Ġ( model . is Tele consult ation Enabled Ġ&& Ġmodel . is User LoggedIn ) Ġ{ ĊĠĠĠĠĠ Ġrender Tele consult Button ( model ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġui . hide Tele consult Button () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġrender Tele consult Button ( model : ĠPatient Summary Model ) Ġ{ ĊĠĠĠ Ġif Ġ( model . has Medical Off ic ers ) Ġ{ ĊĠĠĠĠĠ Ġui . show Tele consult Button () ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġui . hide Tele consult Button () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġsetup Ui For Di abet es Management ( is Di abet es Management Enabled : ĠBoolean ) Ġ{ ĊĠĠĠ Ġif Ġ( is Di abet es Management Enabled ) Ġ{ ĊĠĠĠĠĠ Ġui . show Di abet es View () ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġui . hide Di abet es View () ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ