generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from CDC-HIS/develop
Sync Develop to Master
- Loading branch information
Showing
65 changed files
with
41,983 additions
and
461 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,4 @@ dist/ | |
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
.yarn/install-state.gz |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
set -e # die on error | ||
set -e # die on error | ||
|
||
npx pretty-quick --staged | ||
yarn lint |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
set -e # die on error | ||
set -e # die on error | ||
|
||
yarn verify | ||
yarn verify |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
tsconfig.json | ||
*.ts | ||
!*.d.ts | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
.yarn/install-state.gz | ||
|
Binary file not shown.
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 |
---|---|---|
@@ -1,12 +1,32 @@ | ||
|
||
# OpenMRS ESM Ethiohri App | ||
# ETHIOHRI ESM | ||
|
||
A custom microfrontend for Ethiopia's integration into OHRI | ||
A custom microfrontend for Ethiopia's integration into OHRI built on top of OpenMRS 3.x | ||
|
||
## Pre-requisites | ||
|
||
## Running this code | ||
- [Node v16 or higher](https://nodejs.org/en/download/) | ||
- Yarn | ||
- TypeScript | ||
- Code editor (VSCode is preferred) | ||
|
||
## Getting Started | ||
|
||
```sh | ||
yarn # to install dependencies | ||
yarn start # to run the dev server | ||
# With SSH | ||
git clone git@github.com:CDC-HIS/openmrs-esm-ethiohri.git | ||
|
||
# Without SSH | ||
git clone https://github.com/CDC-HIS/openmrs-esm-ethiohri.git | ||
|
||
# Change directory | ||
cd openmrs-esm-ethiohri | ||
# Install dependencies | ||
yarn | ||
|
||
# Run development server on port 8080 | ||
yarn start | ||
|
||
# OR to run on a different port for example 8090 | ||
yarn start --port 8090 | ||
``` |
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,42 @@ | ||
## Frontend | ||
|
||
|
||
### Import Map | ||
|
||
``` | ||
{ | ||
"imports": { | ||
"@openmrs/esm-home-app": "next", | ||
"@openmrs/esm-patient-notes-app": "next", | ||
"@openmrs/esm-patient-forms-app": "next", | ||
"@openmrs/esm-patient-programs-app": "next", | ||
"@openmrs/esm-patient-test-results-app": "next", | ||
"@openmrs/esm-patient-attachments-app": "next", | ||
"@openmrs/esm-patient-search-app": "next", | ||
"@openmrs/esm-patient-appointments-app": "next", | ||
"@openmrs/esm-patient-list-app": "next", | ||
"@openmrs/esm-patient-medications-app": "next", | ||
"@icap-ethiopia/esm-patient-chart-app": "next", | ||
"@openmrs/esm-patient-immunizations-app": "next", | ||
"@openmrs/esm-patient-conditions-app": "next", | ||
"@openmrs/esm-dispensing-app": "next", | ||
"@openmrs/esm-patient-banner-app": "next", | ||
"@openmrs/esm-devtools-app": "next", | ||
"@openmrs/esm-patient-biometrics-app": "next", | ||
"@openmrs/esm-login-app": "next", | ||
"@icap-ethiopia/esm-patient-registration-app": "next", | ||
"@openmrs/esm-patient-allergies-app": "next", | ||
"@openmrs/esm-primary-navigation-app": "next", | ||
"@openmrs/esm-patient-vitals-app": "next", | ||
"@ohri/openmrs-esm-ohri-core-app": "next", | ||
"@openmrs/esm-appointments-app": "next", | ||
"@openmrs/esm-outpatient-app": "next", | ||
"@openmrs/esm-implementer-tools-app": "next", | ||
"@ohri/openmrs-esm-ohri-cervical-cancer-app": "next", | ||
"@ohri/openmrs-esm-ohri-hiv-app": "next", | ||
"@openmrs/esm-form-builder-app": "next", | ||
"@icap-ethiopia/esm-ethiohri-app": "next" | ||
} | ||
} | ||
``` |
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
39 changes: 39 additions & 0 deletions
39
src/actions-buttons/test-patient-details-button.component.tsx
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,39 @@ | ||
import React from "react"; | ||
import { navigate } from "@openmrs/esm-framework"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
interface TestPatientDetailsButtonProps { | ||
onTransition?: () => void; | ||
patientUuid: string; | ||
} | ||
|
||
const TestPatientDetailsButton: React.FC<TestPatientDetailsButtonProps> = ({ | ||
patientUuid, | ||
onTransition, | ||
}) => { | ||
const { t } = useTranslation(); | ||
const handleClick = React.useCallback(() => { | ||
navigate({ | ||
to: `\${openmrsSpaBase}/patient/${patientUuid}/chart/Clinical Visits`, | ||
}); | ||
onTransition && onTransition(); | ||
}, [onTransition, patientUuid]); | ||
|
||
return ( | ||
<li className="cds--overflow-menu-options__option"> | ||
<button | ||
className="cds--overflow-menu-options__btn" | ||
role="menuitem" | ||
title={t("Open Forms", "Test patient details")} | ||
data-floating-menu-primary-focus | ||
onClick={handleClick} | ||
> | ||
<span className="cds--overflow-menu-options__option-content"> | ||
{t("testactionbutton", "Test patient details")} | ||
</span> | ||
</button> | ||
</li> | ||
); | ||
}; | ||
|
||
export default TestPatientDetailsButton; |
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,3 @@ | ||
.link { | ||
text-decoration: none; | ||
} |
Oops, something went wrong.