package Ġorg . co epi . android . repo Ċ Ċ import Ġio . reactivex . Observable Ċ import Ġio . reactivex . Single Ċ import Ġio . reactivex . Single . just Ċ import Ġorg . co epi . android . c en . Sy mptom Report Ċ import Ġorg . co epi . android . domain . Co E pi Date . Companion . now Ċ import Ġorg . co epi . android . system . rx . Void Operation State Ċ import Ġorg . co epi . android . domain . model . Sy mptom Ċ import Ġjava . util . UUID . randomUUID Ċ Ċ interface ĠSy mptom Repo Ġ{ ĊĠĠĠ Ġval Ġsend Report State : ĠObservable < Void Operation State > ĊĊĠĠĠ Ġfun Ġsy mptoms (): ĠSingle < List < Sy mptom >> ĊĠĠĠ Ġfun Ġsubmit Sy mptoms ( sy mptoms : ĠList < Sy mptom >) Ċ } Ċ Ċ class ĠSy mptom Repo Impl ( ĊĠĠĠ Ġprivate Ġval Ġco E pi Repo : ĠCo E pi Repo Ċ ): ĠSy mptom Repo Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġsend Report State : ĠObservable < Void Operation State > Ġ= Ġco E pi Repo . send Report State . share () ĊĊĠĠĠ Ġoverride Ġfun Ġsy mptoms (): ĠSingle < List < Sy mptom >> Ġ= Ġjust ( listOf ( ĊĠĠĠĠĠĠĠ ĠSy mptom (" 1 ", Ġ" F ever "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 2 ", Ġ" T ired ness "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 3 ", Ġ" Loss Ġof Ġap pet ite "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 4 ", Ġ" M us cle Ġa ches "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 5 ", Ġ" Tro uble Ġbre ath ing "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 6 ", Ġ" N as al Ġcon gestion "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 7 ", Ġ" S ne ez ing "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 8 ", Ġ" S ore Ġth ro at "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 9 ", Ġ" Head aches "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 1 0 ", Ġ" Di arr he a "), ĊĠĠĠĠĠĠĠ ĠSy mptom (" 1 1 ", Ġ" Loss Ġof Ġs mell Ġor Ġt aste ") ĊĠĠĠ Ġ)) ĊĊĠĠĠ Ġoverride Ġfun Ġsubmit Sy mptoms ( sy mptoms : ĠList < Sy mptom >) Ġ{ ĊĠĠĠĠĠĠĠ Ġco E pi Repo . send Report ( sy mptoms . to Report ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun ĠList < Sy mptom >. to Report (): ĠSy mptom Report Ġ= ĠSy mptom Report ( ĊĠĠĠĠĠĠĠ Ġid Ġ= Ġrandom UUID (). toString (), ĊĠĠĠĠĠĠĠ Ġsy mptoms Ġ= Ġthis , ĊĠĠĠĠĠĠĠ Ġdate Ġ= Ġnow () ĊĠĠĠ Ġ) Ċ } Ċ