MccCareplan / patientsmartapp

Patient facing mobile smart on fhir Web app for multiple chronic condition care plans
Apache License 2.0
2 stars 2 forks source link

Add Basic Development Mode and Patient Context #6

Open ferret1964 opened 3 years ago

sam3365 commented 3 years ago

Added ngrx library to project. Coded State, Actions, Reducers and Effects. Got Developer mode working where you can select between Betsy and Patricia. The ngrx Selectors are not working. As a workaround, selecting directly from the Ngrx store in the patient-selector component. Need to figure out why selectors not working.

sam3365 commented 3 years ago

Fixed issue Ngrx store. Had to define the State in /reducers/index.ts as follows using the "topLevel". Ngrx was adding topLevel when creating the store, but the coding (from examples prior to latest release of Ngrx) was not taking into account this extra layer of the State hierarchy.

export interface State { topLevel: { patient: fromPatient.State; devmode: fromDevMode.State; }; }

Creating separate feature story to incoporate Http services into the project.

This feature focused on adding Ngrx plumbing to the project.

ngrx_lifecycle.png

sam3365 commented 3 years ago

I referenced this link in working on this story:

https://kimsereyblog.blogspot.com/2017/07/managing-global-state-with-ngrx-store.html