...
Dependency | Functionality | Link |
---|---|---|
React-table | Rendering tables. | |
Reactjs-popup | Generate modals. | |
React-Redux | State management. |
Project Structure
Project Structure image
Components
Flags
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag | full |
DELETE /patientflags/flag/{flagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
deleteFlag | rowIndex | Delete flag data at particular row of table |
buttonGenerator | index, passedData | Generate edit and delete action buttons for a particular record. |
tagListGenerator | passedData | Generate object containing names of associated tags - rendered in table as comma separated values |
handleOptionChangeTags | Handler for selecting tags when filtering flags by associated tags | |
handleEvaluatorChange | Handler for selecting how to filter tags (radio button options) | |
handleSubmit | Handler containing logic for filtering table data based on tags. | |
editCallback | dataFromChild, index | Handles data object returned from Edit Flags modal. |
Edit Flags (Modal)
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag/{flagName} | def |
POST /patientflags/flag/{FlagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
selectionMapping | data | Maps selected tags and priorities to state objects |
postFlag | dispatches updateFlag action to POST new/updated flag data | |
handleOptionChangeTags | Handler for multi-select box when tags associated with flag are changed. | |
handleOptionChangePriority | Handler for drop down menu when priority associated with flag is changed. | |
handleSubmit | Handler for when flag data form is submitted. |
Tags
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag | full |
DELETE /patientflags/flag/{flagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
deleteFlag | rowIndex | Delete flag data at particular row of table |
buttonGenerator | index, passedData | Generate edit and delete action buttons for a particular record. |
tagListGenerator | passedData | Generate object containing names of associated tags - rendered in table as comma separated values |
handleOptionChangeTags | Handler for selecting tags when filtering flags by associated tags | |
handleEvaluatorChange | Handler for selecting how to filter tags (radio button options) | |
handleSubmit | Handler containing logic for filtering table data based on tags. | |
editCallback | dataFromChild, index | Handles data object returned from Edit Flags modal. |
Edit Tags (Modal)
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag/{flagName} | def |
POST /patientflags/flag/{FlagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
selectionMapping | data | Maps selected tags and priorities to state objects |
postFlag | dispatches updateFlag action to POST new/updated flag data | |
handleOptionChangeTags | Handler for multi-select box when tags associated with flag are changed. | |
handleOptionChangePriority | Handler for drop down menu when priority associated with flag is changed. | |
handleSubmit | Handler for when flag data form is submitted. |
Priorities
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag | full |
DELETE /patientflags/flag/{flagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
deleteFlag | rowIndex | Delete flag data at particular row of table |
buttonGenerator | index, passedData | Generate edit and delete action buttons for a particular record. |
tagListGenerator | passedData | Generate object containing names of associated tags - rendered in table as comma separated values |
handleOptionChangeTags | Handler for selecting tags when filtering flags by associated tags | |
handleEvaluatorChange | Handler for selecting how to filter tags (radio button options) | |
handleSubmit | Handler containing logic for filtering table data based on tags. | |
editCallback | dataFromChild, index | Handles data object returned from Edit Flags modal. |
Edit Priority (Modal)
API Endpoints used:
Endpoint | Ref |
---|---|
GET /patientflags/flag/{flagName} | def |
POST /patientflags/flag/{FlagName} | def |
Functions:
Function | Parameter | Description |
---|---|---|
selectionMapping | data | Maps selected tags and priorities to state objects |
postFlag | dispatches updateFlag action to POST new/updated flag data | |
handleOptionChangeTags | Handler for multi-select box when tags associated with flag are changed. | |
handleOptionChangePriority | Handler for drop down menu when priority associated with flag is changed. | |
handleSubmit | Handler for when flag data form is submitted. |