package Ġorg . simple . clin ic . tele consult log . tele consult record . screen Ċ Ċ import Ġcom . spotify . mob ius . Next Ċ import Ġcom . spotify . mob ius . Next . no Change Ċ import Ġcom . spotify . mob ius . Update Ċ import Ġorg . simple . clin ic . mob ius . dispatch Ċ import Ġorg . simple . clin ic . mob ius . next Ċ Ċ class ĠTele consult Record Update Ġ: ĠUpdate < Tele consult Record Model , ĠTele consult Record Event , ĠTele consult Record Effect > Ġ{ ĊĊĠ Ġoverride Ġfun Ġupdate ( model : ĠTele consult Record Model , Ġevent : ĠTele consult Record Event ): ĠNext < Tele consult Record Model , ĠTele consult Record Effect > Ġ{ ĊĠĠĠ Ġreturn Ġwhen Ġ( event ) Ġ{ ĊĠĠĠĠĠ ĠBack Clicked Ġ-> Ġdispatch ( Validate Tele consult Record ( model . tele consult Record Id )) ĊĠĠĠĠĠ Ġis ĠTele consult Record Loaded Ġ-> Ġtele consult Record Loaded ( model , Ġevent ) ĊĠĠĠĠĠ Ġis ĠTele consult Record Created Ġ-> Ġdispatch ( Clone Patient Pre scriptions ( model . patient Uuid , Ġmodel . tele consult Record Id )) ĊĠĠĠĠĠ Ġis ĠDone Clicked Ġ-> Ġnext ( ĊĠĠĠĠĠĠĠĠĠ Ġmodel . creating Tele consult Record (), ĊĠĠĠĠĠĠĠĠĠ ĠCreate Tele consult Record ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Uuid Ġ= Ġmodel . patient Uuid , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtele consult Record Id Ġ= Ġmodel . tele consult Record Id , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtele consult ation Type Ġ= Ġevent . tele consult ation Type , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpatient T ook Med icine Ġ= Ġevent . patient T ook Med ic ines , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpatient Consent ed Ġ= Ġevent . patient Consent ed ĊĠĠĠĠĠĠĠĠĠ Ġ)) ĊĠĠĠĠĠ Ġis ĠPatient Details Loaded Ġ-> Ġnext ( model . patient Loaded ( event . patient )) ĊĠĠĠĠĠ Ġis ĠTele consult Record Validated Ġ-> Ġtele consult Record Validated ( event ) ĊĠĠĠĠĠ ĠPatient Pre scriptions Cl oned Ġ-> Ġnext ( ĊĠĠĠĠĠĠĠĠĠ Ġmodel . tele consult Record Created (), ĊĠĠĠĠĠĠĠĠĠ ĠNavigate To Tele consult Success ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġtele consult Record Validated ( event : ĠTele consult Record Validated ): ĠNext < Tele consult Record Model , ĠTele consult Record Effect > Ġ{ ĊĠĠĠ Ġreturn Ġif Ġ( event . tele consult Record Exists ) Ġ{ ĊĠĠĠĠĠ Ġdispatch ( Go Back ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġdispatch ( Show Tele consult Not Re corded Warning ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġtele consult Record Loaded ( ĊĠĠĠĠĠ Ġmodel : ĠTele consult Record Model , ĊĠĠĠĠĠ Ġevent : ĠTele consult Record Loaded ĊĠ Ġ): ĠNext < Tele consult Record Model , ĠTele consult Record Effect > Ġ{ ĊĠĠĠ Ġval Ġtele consult Record Info Ġ= Ġevent . tele consult Record ?. tele consult Record Info ĊĠĠĠ Ġreturn Ġif Ġ( tele consult Record Info Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠ Ġnext ( model . tele consult Record Loaded ( tele consult Record Info )) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠ Ġno Change () ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ