Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.

Commit 38d2924

Browse files
authored
Adaptations for incoming patient chart modifications (#9)
* Migrated files from patient-chart-widgets. * Removed unused code from visit-button. * Entirely removed dependencies to the visit and location widgets. * Removed now unused members. * Removed unused mocks. * Added floating order basket button. * Added Sass. * Begin restructuring of project. * Continue extracting the new active-medications.component.tsx. * Redesigned the active medications table. * Integrate medication table component into the summary page. * Remove somewhat underused interface. * Added pagination support. * Enable navigation to the order basket page. * Remove unused imports. * Start work on the order basket. * Continue work on the order basket search. * Reworked suggestions and search results. * Improved search in backend. * Added search query parameter support. * Removed unused imports. * Documentation and translation updates. * Extract search results into its own component. * Continue component extraction. * Refine search and enrich results with common-medication data. * Show search result message when there are no results. * Begun work on the order form. * Added all required controls on the order form. * Finished styling of the order form. * Connect all form fields with the respective order field. * Added TODO. * Cleanup. * Display the new orders in the order basket. * Prepare API requests for NEW entries. * Import less styles. * Added free text dosage support. * Dont allow negative durations. Indicate that a duration of 0 means no duration. * Removed obsolete suggestions popup. ;( * Added pagination to search results. * Improved search. * Enable editing of previously added order basket items. * Split up the order basket. * Update search result styling. * Set min value for prescription refills. * Set min value for prescription refills. Update durationInput logic to correctly use numbers. * Fixed package.json * Fixed package.json #2 * package-lock.json commit * Reworked order form header to match latest designs. * Reworked pills dispensed field to match latest designs. * Reworked medication order table to use standard components (see latest design). * Move order form files into main folder. * Updated dependencies and npm commands. * Fixed combobox clearing. * Added remaining order basket item actions. Updated styling. * Remove debugging code. * Work on POSTing a NEW order. * Rework of code structure. * Update to latest designs. * Enable creating and discontinuing (preliminary) * Code rework * Code rework * Moved and renamed types. * Dont allow modifying discontinued orders. * Display error for unsaveable items. * Go back to patient chart when all orders are done. * Reorder code. * Display newly ordered items in the active medications table in the order basket. * Integrate item count into floating order basket button. * Add support for reordering. * Add boilerplate for future revise support. * Use global store. * Post the correct dosingType and instructions depending on whether the order uses free-text dosages. * Removed obsolete stuff. * Moved functions into correct location. * Addressed PR feedback * Use default exports. * Update TODO to be more up-to-date with the plans. * POST and GET all relevant values from the order form. * Update REORDER to use all old values. * useCallback on discontinue. * Performance improvements. * Updated heading to match design. * Adaptations to the removal of the patient chart tabs. * Updated package.json
1 parent d79d8b8 commit 38d2924

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openmrs/esm-drugorder-app",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "Drug order microfrontend for the OpenMRS SPA",
55
"main": "dist/openmrs-esm-drugorder.js",
66
"types": "src/index.ts",

src/order-basket/order-basket-shell.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function OrderBasketShell() {
1515
<Header aria-label={t('orderBasket', 'Order Basket')} style={{ position: 'sticky' }}>
1616
<HeaderName prefix="">{t('orderBasket', 'Order Basket')}</HeaderName>
1717
<HeaderGlobalBar>
18-
<Link to={`/patient/${patientUuid}/chart/orders/medication-orders`}>
18+
<Link to={`/patient/${patientUuid}/chart/orders`}>
1919
<HeaderGlobalAction aria-label={t('close', 'Close')} title={t('close', 'Close')}>
2020
<Close32 />
2121
</HeaderGlobalAction>

src/order-basket/order-basket.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ const OrderBasket = connect(
8080
fetchActivePatientOrders();
8181

8282
if (erroredItems.length == 0) {
83-
history.push(`/patient/${patientUuid}/chart/orders/medication-orders`);
83+
history.push(`/patient/${patientUuid}/chart/orders`);
8484
}
8585
});
8686
return () => abortController.abort();
8787
};
8888

8989
const handleCancelClicked = () => {
9090
setItems([]);
91-
history.push(`/patient/${patientUuid}/chart/orders/medication-orders`);
91+
history.push(`/patient/${patientUuid}/chart/orders`);
9292
};
9393

9494
const openMedicationOrderFormForAddingNewOrder = (newOrderBasketItem: OrderBasketItem) => {

src/root-extension.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function ExtensionRoot() {
1414
<div className={styles.resetPatientChartWidgetContainer}>
1515
<BrowserRouter basename={window['getOpenmrsSpaBase']()}>
1616
<Switch>
17-
<Route exact path="/patient/:patientUuid/chart/orders/medication-orders">
17+
<Route exact path="/patient/:patientUuid/chart/orders">
1818
<Provider store={orderBasketStore}>
1919
<MedicationsSummary />
2020
</Provider>

src/root.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $danger: #da1e28;
1111
.resetPatientChartWidgetContainer {
1212
/* The patient chart's .widgetContainer centers text. We don't want that with Carbon. */
1313
text-align: initial;
14+
margin: 0 $spacing-05 $spacing-05 $spacing-05;
1415
}
1516

1617
.productiveHeading01 {

0 commit comments

Comments
 (0)