package Ġorg . simple . clin ic . home . over due Ċ Ċ import Ġandroid . annotation . Suppress Lint Ċ import Ġandroid . content . Context Ċ import Ġandroid . os . Parcelable Ċ import Ġandroid . util . Attribute Set Ċ import Ġandroid . widget . Relative Layout Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . paging . Paged List Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager Ċ import Ġcom . jak ew h art on . r xb ind ing 3 . view . det aches Ċ import Ġio . reactivex . rx kotlin . of Type Ċ import Ġkotlinx . android . synt hetic . main . screen _ over due . view .* Ċ import Ġorg . simple . clin ic . R Ċ import Ġorg . simple . clin ic . Report Analytics Events Ċ import Ġorg . simple . clin ic . contact patient . Contact Patient Bottom Sheet Ċ import Ġorg . simple . clin ic . databinding . Item Over due List Patient Binding Ċ import Ġorg . simple . clin ic . di . injector Ċ import Ġorg . simple . clin ic . mob ius . Mob ius Delegate Ċ import Ġorg . simple . clin ic . navigation . v 2 . Router Ċ import Ġorg . simple . clin ic . summary . Open Int ention Ċ import Ġorg . simple . clin ic . summary . Patient Summary Screen Key Ċ import Ġorg . simple . clin ic . util . User Clock Ċ import Ġorg . simple . clin ic . util . Utc Clock Ċ import Ġorg . simple . clin ic . util . unsafe Lazy Ċ import Ġorg . simple . clin ic . widgets . Paging Item Adapter Ċ import Ġorg . simple . clin ic . widgets . visible Or G one Ċ import Ġjava . time . Instant Ċ import Ġjava . time . LocalDate Ċ import Ġjava . time . format . DateTime Formatter Ċ import Ġjava . util . UUID Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Named Ċ Ċ class ĠOver due Screen ( ĊĠĠĠ Ġcontext : ĠContext , ĊĠĠĠ Ġattrs : ĠAttributeSet Ċ ) Ġ: ĠRelative Layout ( context , Ġattrs ), ĠOver due Ui Actions Ġ{ ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġactivity : ĠAppCompatActivity ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġrouter : ĠRouter ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġuser Clock : ĠUser Clock ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġut c Clock : ĠU tc Clock ĊĊĠ Ġ@ Inject ĊĠ Ġ@ Named (" full _ date ") ĊĠ Ġlateinit Ġvar Ġdate Formatter : ĠDateTime Formatter ĊĊĠ Ġ@ Inject ĊĠ Ġlateinit Ġvar Ġeffect Handler Factory : ĠOver due Effect Handler . Factory ĊĊĠ Ġ@ Inject ĊĠ Ġ@ Named (" for _ over due _ app ointments ") ĊĠ Ġlateinit Ġvar Ġpage d List Config : ĠP aged List . Config ĊĊĠ Ġprivate Ġval Ġover due ListAdapter Ġ= ĠP aging Item Adapter ( ĊĠĠĠĠĠ Ġdiff Callback Ġ= ĠOver due Appointment Row . Diff Callback (), ĊĠĠĠĠĠ Ġbindings Ġ= Ġmap Of ( ĊĠĠĠĠĠĠĠĠĠ ĠR . layout . item _ over due _ list _ patient Ġto Ġ{ Ġlayout Inflater , Ġparent Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠItem Over due List Patient Binding . inflate ( layout Inflater , Ġparent , Ġfalse ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ) ĊĠ Ġ) ĊĊĠ Ġprivate Ġval Ġevents Ġby Ġunsafe Lazy Ġ{ ĊĠĠĠ Ġover due ListAdapter ĊĠĠĠĠĠĠĠ Ġ. item Events ĊĠĠĠĠĠĠĠ Ġ. compose ( Report Analytics Events ()) ĊĠĠĠĠĠĠĠ Ġ. share () ĊĠ Ġ} ĊĊĠ Ġprivate Ġval Ġdelegate Ġby Ġunsafe Lazy Ġ{ ĊĠĠĠ Ġval Ġdate Ġ= ĠLocalDate . now ( user Clock ) ĊĊĠĠĠ ĠMob ius Delegate . for View ( ĊĠĠĠĠĠĠĠ Ġevents Ġ= Ġevents . of Type (), ĊĠĠĠĠĠĠĠ Ġdefault Model Ġ= ĠOver due Model . create (), ĊĠĠĠĠĠĠĠ Ġupdate Ġ= ĠOver due Update ( date ), ĊĠĠĠĠĠĠĠ Ġeffect Handler Ġ= Ġeffect Handler Factory . create ( this ). build (), ĊĠĠĠĠĠĠĠ Ġinit Ġ= ĠOver due Init (), ĊĠĠĠĠĠĠĠ Ġmodel Update Listener Ġ= Ġ{ Ġ/* ĠNothing Ġto Ġdo Ġhere Ġ*/ Ġ} ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Finish Inf late () Ġ{ ĊĠĠĠ Ġsuper . on Finish Inf late () ĊĠĠĠ Ġif Ġ( isIn Edit Mode ) Ġ{ ĊĠĠĠĠĠ Ġreturn ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcontext . injector < Injector >(). inject ( this ) ĊĊĠĠĠ Ġover due RecyclerView . adapter Ġ= Ġover due ListAdapter ĊĠĠĠ Ġover due RecyclerView . layout Manager Ġ= ĠLinearLayoutManager ( context ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Attached To Window () Ġ{ ĊĠĠĠ Ġsuper . on Attached To Window () ĊĠĠĠ Ġdelegate . start () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Detached From Window () Ġ{ ĊĠĠĠ Ġdelegate . stop () ĊĠĠĠ Ġsuper . on Detached From Window () ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Save InstanceState (): ĠParcel able ? Ġ{ ĊĠĠĠ Ġreturn Ġdelegate . on Save InstanceState ( super . on Save InstanceState ()) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Restore InstanceState ( state : ĠParcel able ?) Ġ{ ĊĠĠĠ Ġsuper . on Restore InstanceState ( delegate . on Restore InstanceState ( state )) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġopen Phone Mask Bottom Sheet ( patient Uuid : ĠUUID ) Ġ{ ĊĠĠĠ Ġactivity . startActivity ( Contact Patient Bottom Sheet . intent ( context , Ġpatient Uuid )) ĊĠ Ġ} ĊĊĠ Ġ@ Suppress Lint (" Check Result ") ĊĠ Ġoverride Ġfun Ġshow Over due App ointments ( dataSource : ĠOver due Appointment Row DataSource . Factory ) Ġ{ ĊĠĠĠ Ġval Ġdet aches Ġ= Ġdet aches () ĊĊĠĠĠ ĠdataSource ĊĠĠĠĠĠĠĠ Ġ. to Observable ( page d List Config , Ġdet aches ) ĊĠĠĠĠĠĠĠ Ġ. take Until ( det aches ) ĊĠĠĠĠĠĠĠ Ġ. do On Next Ġ{ Ġapp ointments List Ġ-> ĊĠĠĠĠĠĠĠĠĠ Ġval Ġare Over due App ointments Available Ġ= Ġapp ointments List . isNotEmpty () ĊĊĠĠĠĠĠĠĠĠĠ Ġview For Empty List . visible Or G one ( isVisible Ġ= Ġ! are Over due App ointments Available ) ĊĠĠĠĠĠĠĠĠĠ Ġover due RecyclerView . visible Or G one ( isVisible Ġ= Ġare Over due App ointments Available ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ. subscribe ( over due ListAdapter :: submit List ) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġopen Patient Summary ( patient Uuid : ĠUUID ) Ġ{ ĊĠĠĠ Ġrouter . push ( ĊĠĠĠĠĠĠĠ ĠPatient Summary Screen Key ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Uuid Ġ= Ġpatient Uuid , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġintention Ġ= ĠOpen Int ention . View Existing Patient , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġscreen Created Timestamp Ġ= ĠInstant . now ( utc Clock ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġinterface ĠInject or Ġ{ ĊĠĠĠ Ġfun Ġinject ( target : ĠOver due Screen ) ĊĠ Ġ} Ċ } Ċ