-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Arjun/Ashish | BAH-3106 | Ability to bring up the Add to drug chart m…
…odal with its elements from Treatments display control in Patient Dashboard by clicking on Add to drug chart link (#645) * integrate DrugChartModal from ipd in dashboard * add. changes to modify Drug Chart Controller values * add. changes to communicate between modal and add to drug chart link * make schedule and start time frequencies configurable
- Loading branch information
Showing
5 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import PropTypes from "prop-types"; | ||
import React, { Suspense, lazy } from "react"; | ||
|
||
export function DrugChartModal(props) { | ||
const LazyApp = lazy(() => import("@openmrs-mf/ipd/DrugChartModal")); | ||
|
||
return ( | ||
<> | ||
<Suspense fallback={""}> | ||
<LazyApp | ||
hostData={props.hostData} | ||
hostApi={props.hostApi} | ||
/> | ||
</Suspense> | ||
</> | ||
); | ||
} | ||
|
||
// Without propTypes, react2angular won't render the component | ||
DrugChartModal.propTypes = { | ||
hostData: PropTypes.shape({ | ||
drugOrder: PropTypes.object, | ||
scheduleFrequencies: PropTypes.array, | ||
startTimeFrequencies: PropTypes.array, | ||
}).isRequired, | ||
hostApi: PropTypes.shape({ | ||
closeDrugChart: PropTypes.func, | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters