package Ġcom . example . my di agnosis . view model Ċ Ċ import Ġandroid . arch . lifecycle . Mutable LiveData Ċ import Ġandroid . arch . lifecycle . ViewModel Ċ import Ġandroid . content . Context Ċ import Ġcom . example . my di agnosis . model . Lab Test Ċ import Ġcom . example . my di agnosis . use case . Fetch Lab Tests UseCase Ċ import Ġcom . example . my di agnosis . use case . Select Evidence UseCase Ċ import Ġkotlinx . coroutines . Coroutine Scope Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠLab Tests ViewModel Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġvar Ġlab Tests Ġ: ĠMutable LiveData < List < Lab Test >> Ġ= ĠMutable LiveData () ĊĊĠĠĠ Ġfun Ġfetch Lab Tests ( context : ĠContext ) Ġ{ ĊĊĠĠĠĠĠĠĠ ĠCor outine Scope ( Dispatch ers . IO ). launch Ġ{ ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġuse Case Ġ= ĠFetch Lab Tests UseCase ( context ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġlab Tests . post Value ( use Case . run ()) ĊĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġon Lab TestResult Added ( context : ĠContext , Ġlab TestResult Id Ġ: ĠString ) Ġ{ ĊĊĠĠĠĠĠĠĠ ĠSelect Evidence UseCase (). run ( context , Ġlab TestResult Id , Ġ" present ") ĊĊĠĠĠ Ġ} ĊĊĊ Ċ }