package Ġorg . simple . clin ic . summary Ċ Ċ import Ġcom . spotify . mob ius . rx 2 . Rx Mob ius Ċ import Ġdagger . Lazy Ċ import Ġdagger . ass isted . Ass isted Ċ import Ġdagger . ass isted . Ass isted Factory Ċ import Ġdagger . ass isted . Ass isted Inject Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Observable Transformer Ċ import Ġio . reactivex . Scheduler Ċ import Ġorg . simple . clin ic . app config . Country Ċ import Ġorg . simple . clin ic . blood s ugar . Blood S ugar Repository Ċ import Ġorg . simple . clin ic . bp . Blood Pressure Repository Ċ import Ġorg . simple . clin ic . drug s . Pre scription Repository Ċ import Ġorg . simple . clin ic . facility . Facility Ċ import Ġorg . simple . clin ic . facility . Facility Repository Ċ import Ġorg . simple . clin ic . medical history . Medical History Repository Ċ import Ġorg . simple . clin ic . over due . Appointment Repository Ċ import Ġorg . simple . clin ic . patient . Patient Profile Ċ import Ġorg . simple . clin ic . patient . Patient Repository Ċ import Ġorg . simple . clin ic . patient . business id . Identifier . Identifier Type . Bp Passport Ċ import Ġorg . simple . clin ic . summary . add phone . Missing Phone Reminder Repository Ċ import Ġorg . simple . clin ic . summary . tele consult ation . sync . Tele consult ation Facility Repository Ċ import Ġorg . simple . clin ic . sync . Data Sync Ċ import Ġorg . simple . clin ic . sync . Sync Group . FREQ U ENT Ċ import Ġorg . simple . clin ic . user . User Ċ import Ġjava . util . Optional Ċ import Ġorg . simple . clin ic . util . filter And Un wrap Just Ċ import Ġorg . simple . clin ic . util . scheduler . Schedulers Provider Ċ import Ġorg . simple . clin ic . util . to Nullable Ċ import Ġorg . simple . clin ic . uuid . Uuid Generator Ċ import Ġjava . util . UUID Ċ import Ġjava . util . function . Function Ċ Ċ class ĠPatient Summary Effect Handler Ġ@ Ass isted Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġs chedulers Provider : ĠS chedulers Provider , ĊĠĠĠ Ġprivate Ġval Ġpatient Repository : ĠPatient Repository , ĊĠĠĠ Ġprivate Ġval Ġblood Pressure Repository : ĠB lood Pressure Repository , ĊĠĠĠ Ġprivate Ġval Ġappointment Repository : ĠAppointment Repository , ĊĠĠĠ Ġprivate Ġval Ġmissing Phone Reminder Repository : ĠMissing Phone Reminder Repository , ĊĠĠĠ Ġprivate Ġval Ġblood S ugar Repository : ĠB lood S ugar Repository , ĊĠĠĠ Ġprivate Ġval Ġdata Sync : ĠData Sync , ĊĠĠĠ Ġprivate Ġval Ġmedical History Repository : ĠMedical History Repository , ĊĠĠĠ Ġprivate Ġval Ġpre scription Repository : ĠPre scription Repository , ĊĠĠĠ Ġprivate Ġval Ġcountry : ĠCountry , ĊĠĠĠ Ġprivate Ġval Ġpatient Summary Config : ĠPatient Summary Config , ĊĠĠĠ Ġprivate Ġval ĠcurrentUser : ĠLazy < User >, ĊĠĠĠ Ġprivate Ġval Ġcurrent Facility : ĠLazy < Facility >, ĊĠĠĠ Ġprivate Ġval Ġuuid Generator : ĠU uid Generator , ĊĠĠĠ Ġprivate Ġval Ġfacility Repository : ĠFac ility Repository , ĊĠĠĠ Ġprivate Ġval Ġtele consult ation Facility Repository : ĠTele consult ation Facility Repository , ĊĠĠĠ Ġ@ Ass isted Ġprivate Ġval Ġui Actions : ĠPatient Summary Ui Actions Ċ ) Ġ{ ĊĊĠ Ġ@ Ass isted Factory ĊĠ Ġinterface ĠFactory Ġ{ ĊĠĠĠ Ġfun Ġcreate ( ui Actions : ĠPatient Summary Ui Actions ): ĠPatient Summary Effect Handler ĊĠ Ġ} ĊĊĠ Ġfun Ġbuild (): ĠObservable Transformer < Patient Summary Effect , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠRx Mob ius ĊĠĠĠĠĠĠĠ Ġ. subtype Effect Handler < Patient Summary Effect , ĠPatient Summary Event >() ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Load Patient Summary Profile :: class . java , Ġload Patient Summary Profile ( schedul ers Provider . io ())) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Load CurrentUser And Facility :: class . java , Ġload User And Current Facility ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Handle Edit Click :: class . java , Ġ{ Ġui Actions . show Edit Patient Screen ( it . patient Summary Profile , Ġit . current Facility ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. addAction ( Go Back To Previous Screen :: class . java , Ġ{ Ġui Actions . goTo Previous Screen () Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. addAction ( Go To Home Screen :: class . java , Ġ{ Ġui Actions . goTo Home Screen () Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Check For Invalid Phone :: class . java , Ġcheck For Invalid Phone ( schedul ers Provider . io (), Ġs chedulers Provider . ui ())) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Mark Reminder As Shown :: class . java , Ġmark Reminder As Shown ( schedul ers Provider . io ())) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Show Add Phone Popup :: class . java , Ġ{ Ġui Actions . show Add Phone Dialog ( it . patient Uuid ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Show Link Id With Patient View :: class . java , Ġ{ Ġui Actions . show Link Id With Patient View ( it . patient Uuid , Ġit . identifier ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠShow Schedule Appointment Sheet :: class . java , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ{ Ġui Actions . show Schedule Appointment Sheet ( it . patient Uuid , Ġit . sheet Opened From , Ġit . current Facility ) Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġs chedulers Provider . ui () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Load Data For Back Click :: class . java , Ġload Data For Back Click ( schedul ers Provider . io ())) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Load Data For Done Click :: class . java , Ġload Data For Done Click ( schedul ers Provider . io ())) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Trigger Sync :: class . java , Ġtrigger Sync ()) ĊĠĠĠĠĠĠĠ Ġ. addAction ( Show Di agnosis Error :: class . java , Ġ{ Ġui Actions . show Di agnosis Error () Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Fetch Has Shown Missing Phone Reminder :: class . java , Ġfetch Has Shown Missing Phone Reminder ( schedul ers Provider . io ())) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Open Contact Patient Screen :: class . java , Ġ{ Ġui Actions . open Patient Contact Sheet ( it . patient Uuid ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Navigate To Tele consult Record Screen :: class . java , Ġ{ Ġui Actions . navigate To Tele consult Record Screen ( it . patient Uuid , Ġit . tele consult Record Id ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. add Transformer ( Load Medical Off ic ers :: class . java , Ġload Medical Off ic ers ()) ĊĠĠĠĠĠĠĠ Ġ. add Consumer ( Open Contact Doctor Sheet :: class . java , Ġ{ Ġui Actions . open Contact Doctor Sheet ( it . patient Uuid ) Ġ}, Ġs chedulers Provider . ui ()) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Medical Off ic ers (): ĠObservable Transformer < Load Medical Off ic ers , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( schedul ers Provider . io ()) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġtele consult ation Facility Repository . medical Off ic ers For Facility ( current Facility . get (). uuid ) Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map (:: Medical Off ic ers Loaded ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload User And Current Facility (): ĠObservable Transformer < Load CurrentUser And Facility , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Stream Ġ-> ĊĠĠĠĠĠ Ġeffects Stream ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( schedul ers Provider . io ()) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġuser Ġ= ĠcurrentUser . get () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġfacility Ġ= Ġcurrent Facility . get () ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠCurrent User And Facility Loaded ( user , Ġfacility ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Patient Summary Profile ( scheduler : ĠScheduler ): ĠObservable Transformer < Load Patient Summary Profile , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. switch Map Ġ{ Ġpatient Repository . patient Profile ( it . patient Uuid ) Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. filter And Un wrap Just () ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . without Deleted Business Ids (). without Deleted Phone Numbers () Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġpatient Profile Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġregistered Facility Ġ= Ġget Registered Facility ( patient Profile . patient . registered Facility Id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Profile Ġto Ġregistered Facility ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġ( patient Profile , Ġfacility ) Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmap Patient Profile To Summary Profile ( patient Profile , Ġfacility ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map (:: Patient Summary Profile Loaded ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġget Registered Facility ( patient Registered Facility Id : ĠUUID ?): ĠOptional < Facility > Ġ{ ĊĠĠĠ Ġreturn ĠOptional ĊĠĠĠĠĠĠĠ Ġ. of Nullable ( patient Registered Facility Id ) ĊĠĠĠĠĠĠĠ Ġ. flatMap ( Function Ġ{ Ġfacility Repository . facility ( it ) Ġ}) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġmap Patient Profile To Summary Profile ( ĊĠĠĠĠĠ Ġpatient Profile : ĠPatient Profile , ĊĠĠĠĠĠ Ġfacility : ĠOptional < Facility > ĊĠ Ġ): ĠPatient Summary Profile Ġ{ ĊĠĠĠ Ġreturn ĠPatient Summary Profile ( ĊĠĠĠĠĠĠĠ Ġpatient Ġ= Ġpatient Profile . patient , ĊĠĠĠĠĠĠĠ Ġaddress Ġ= Ġpatient Profile . address , ĊĠĠĠĠĠĠĠ ĠphoneNumber Ġ= Ġpatient Profile . phone Numbers . first OrNull (), ĊĠĠĠĠĠĠĠ Ġbp Passport Ġ= Ġpatient Profile . business Ids . filter Ġ{ Ġit . identifier . type Ġ== ĠB p Passport Ġ}. max By OrNull Ġ{ Ġit . createdAt Ġ}, ĊĠĠĠĠĠĠĠ Ġalternative Id Ġ= Ġpatient Profile . business Ids . filter Ġ{ Ġit . identifier . type Ġ== Ġcountry . alternative Identifier Type Ġ}. max By OrNull Ġ{ Ġit . createdAt Ġ}, ĊĠĠĠĠĠĠĠ Ġfacility Ġ= Ġfacility . to Nullable () ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ// ĠTODO ( vs ): Ġ 2 0 2 0 - 0 2 - 1 9 ĠRe visit Ġafter ĠMob ius Ġmigration ĊĠ Ġprivate Ġfun Ġcheck For Invalid Phone ( ĊĠĠĠĠĠ Ġbackground Work Scheduler : ĠScheduler , ĊĠĠĠĠĠ Ġui Work Scheduler : ĠScheduler ĊĠ Ġ): ĠObservable Transformer < Check For Invalid Phone , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( background Work Scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . patient Uuid Ġto Ġhas Invalid Phone ( it . patient Uuid ) Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( ui Work Scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. do On Next Ġ{ Ġ( patient Uuid , Ġis Phone Invalid ) Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( is Phone Invalid ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġui Actions . show Update Phone Dialog ( patient Uuid ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠCompleted Check For Invalid Phone Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġ// ĠTODO ( vs ): Ġ 2 0 2 0 - 0 2 - 1 9 ĠRe visit Ġafter ĠMob ius Ġmigration ĊĠ Ġprivate Ġfun Ġmark Reminder As Shown ( ĊĠĠĠĠĠ Ġscheduler : ĠScheduler ĊĠ Ġ): ĠObservable Transformer < Mark Reminder As Shown , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. flatMap Ġ{ Ġeffect Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmissing Phone Reminder Repository ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. mark Reminder As Shown For ( effect . patient Uuid ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe On ( scheduler ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and Then ( Observable . empty < Patient Summary Event >()) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Data For Back Click ( ĊĠĠĠĠĠ Ġscheduler : ĠScheduler ĊĠ Ġ): ĠObservable Transformer < Load Data For Back Click , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġload Data For Back Click Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġpatient Uuid Ġ= Ġload Data For Back Click . patient Uuid ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtimestamp Ġ= Ġload Data For Back Click . screen Created Timestamp ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmedical History Ġ= Ġmedical History Repository . history For Patient OrDefault Immediate ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdefault History Uuid Ġ= Ġuuid Generator . v 4 (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Uuid Ġ= Ġpatient Uuid ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠData For Back Click Loaded ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġhas Patient Data Changed Since Screen Created Ġ= Ġpatient Repository . has Patient Data Changed Since ( patient Uuid , Ġtimestamp ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcount Of Re corded Measure ments Ġ= Ġcount Of Re corded Measure ments ( patient Uuid ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdi agnosis Re corded Ġ= Ġmedical History . di agnosis Re corded ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġload Data For Done Click ( ĊĠĠĠĠĠ Ġscheduler : ĠScheduler ĊĠ Ġ): ĠObservable Transformer < Load Data For Done Click , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġload Data For Back Click Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġpatient Uuid Ġ= Ġload Data For Back Click . patient Uuid ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmedical History Ġ= Ġmedical History Repository . history For Patient OrDefault Immediate ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġdefault History Uuid Ġ= Ġuuid Generator . v 4 (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Uuid Ġ= Ġpatient Uuid ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠData For Done Click Loaded ( count Of Re corded Measure ments Ġ= Ġcount Of Re corded Measure ments ( patient Uuid ), Ġdi agnosis Re corded Ġ= Ġmedical History . di agnosis Re corded ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġtrigger Sync (): ĠObservable Transformer < Trigger Sync , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. do On Next Ġ{ Ġdata Sync . fire And For get Sync ( FREQ U ENT ) Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠSync Triggered ( it . sheet Opened From ) Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġcount Of Re corded Measure ments ( patient Uuid : ĠUUID ): ĠInt Ġ{ ĊĠĠĠ Ġval Ġcount Of Re corded Blood Press ures Ġ= Ġblood Pressure Repository . blood Pressure Count Immediate ( patient Uuid ) ĊĠĠĠ Ġval Ġcount Of Re corded Blood S ug ars Ġ= Ġblood S ugar Repository . blood S ugar Count Immediate ( patient Uuid ) ĊĊĠĠĠ Ġreturn Ġcount Of Re corded Blood Press ures Ġ+ Ġcount Of Re corded Blood S ug ars ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġhas Invalid Phone ( patient Uuid : ĠUUID ): ĠBoolean Ġ{ ĊĠĠĠ Ġval ĠphoneNumber Ġ= Ġpatient Repository . latest PhoneNumber For Patient ( patient Uuid ) ĊĠĠĠ Ġval Ġappointment Ġ= Ġappointment Repository . last Created Appointment For Patient ( patient Uuid ) ĊĊĠĠĠ Ġreturn Ġwhen Ġ{ ĊĠĠĠĠĠ Ġ! phoneNumber . isPresent () Ġ|| Ġ! appointment . isPresent () Ġ-> Ġfalse ĊĠĠĠĠĠ Ġelse Ġ-> Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactual Number Ġ= ĠphoneNumber . get () ĊĠĠĠĠĠĠĠ Ġval Ġactual Appointment Ġ= Ġappointment . get () ĊĊĠĠĠĠĠĠĠ Ġval Ġwas Appointment Updated After PhoneNumber Ġ= Ġactual Appointment . updatedAt Ġ> Ġactual Number . updatedAt ĊĠĠĠĠĠĠĠ Ġactual Appointment . was Cancelled Because Of Invalid PhoneNumber () Ġ&& Ġwas Appointment Updated After PhoneNumber ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġfetch Has Shown Missing Phone Reminder ( ĊĠĠĠĠĠ Ġscheduler : ĠScheduler ĊĠ Ġ): ĠObservable Transformer < Fetch Has Shown Missing Phone Reminder , ĠPatient Summary Event > Ġ{ ĊĠĠĠ Ġreturn ĠObservable Transformer Ġ{ Ġeffects Ġ-> ĊĠĠĠĠĠ Ġeffects ĊĠĠĠĠĠĠĠĠĠ Ġ. observe On ( scheduler ) ĊĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . patient Uuid Ġ} ĊĠĠĠĠĠĠĠĠĠ Ġ. map ( missing Phone Reminder Repository :: has Shown Reminder For Patient ) ĊĠĠĠĠĠĠĠĠĠ Ġ. map (:: F etched Has Shown Missing Phone Reminder ) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ