Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) HSC-306: ERP billing status via widget #35

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
- created

env:
ESM_NAME: "@openmrs/esm-template-app"
JS_NAME: "openmrs-esm-template-app.js"
ESM_NAME: "@openmrs/esm-patient-billing-status-app"
JS_NAME: "openmrs-esm-patient-billing-status-app.js"

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ dist/

# Intellij integration
*.iml
.idea

# ignores for Yarn v3 w/o PNP
.pnp.*
Expand Down
37 changes: 6 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
![Node.js CI](https://github.com/openmrs/openmrs-esm-template-app/workflows/Node.js%20CI/badge.svg)
![Node.js CI](https://github.com/openmrs/openmrs-esm-patient-billing-status-app/workflows/Node.js%20CI/badge.svg)

# OpenMRS ESM Template App
# OpenMRS ESM Patient Billing Status App

This repository provides a starting point for creating your own
This repository is for OpenMRS 3 to display the billing status of a patient on the patient chart
[OpenMRS Microfrontend](https://wiki.openmrs.org/display/projects/OpenMRS+3.0%3A+A+Frontend+Framework+that+enables+collaboration+and+better+User+Experience).

For more information, please see the
[OpenMRS Frontend Developer Documentation](https://o3-docs.openmrs.org/#/).

In particular, the [Setup](https://o3-docs.openmrs.org/docs/frontend-modules/setup) section can help you get started developing microfrontends in general. The [Creating a microfrontend](https://o3-docs.openmrs.org/docs/recipes/create-a-frontend-module) section provides information about how to use this repository to create your own microfrontend.

## Running this code

```sh
Expand All @@ -20,27 +15,7 @@ yarn start # to run the dev server
Once it is running, a browser window
should open with the OpenMRS 3 application. Log in and then navigate to `/openmrs/spa/root`.

## Adapting the code

1. Start by finding and replacing all instances of "template" with the name
of your microfrontend.
2. Update `index.ts` as appropriate, at least changing the feature name and the page name and route.
3. Rename the `root.*` family of files to have the name of your first page.
4. Delete the contents of the objects in `config-schema`. Start filling them back in once you have a clear idea what will need to be configured.
5. Delete the `greeter` and `patient-getter` directories, and the contents of `root.component.tsx`.
6. Delete the contents of `translations/en.json`.
7. Open up `.github/workflows` and adapt it to your needs. If you're writing
a microfrontend that will be managed by the community, you might be able to
just replace all instances of `template` with your microfrontend's name.
However, if you're writing a microfrontend for a specific organization or
implementation, you will probably need to configure GitHub Actions differently.
8. Delete the contents of this README and write a short explanation of what
you intend to build. Links to planning or design documents can be very helpful.

At this point, you should be able to write your first page as a React application.

Check out the [Medication dispensing app](https://github.com/openmrs/openmrs-esm-dispensing-app) for an example of a non-trivial app built using the Template.

## Integrating it into your application
## Contributing
For more information, please see the [OpenMRS Frontend Developer Documentation](https://openmrs.github.io/openmrs-esm-core/#/).

Please see [Creating a Frontend Module](https://o3-docs.openmrs.org/docs/recipes/create-a-frontend-module).
In particular, the [Setup](https://openmrs.github.io/openmrs-esm-core/#/getting_started/setup) section can help you get started developing microfrontends in general.
5 changes: 2 additions & 3 deletions e2e/specs/sample-test.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import test from '@playwright/test';
import { HomePage } from '../pages';
import { expect } from '@playwright/test';
import { HomePage } from '../pages';

// This test is a sample E2E test. You can delete it.

test('Sample test', async ({ page }) => {
xtest('Sample test', async ({ page }) => {
const homePage = new HomePage(page);
await homePage.goto();
await expect(homePage.page.getByRole('link', { name: 'Home' })).toBeVisible();
Expand Down
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@openmrs/esm-template-app",
"version": "4.0.0",
"name": "@openmrs/esm-patient-billing-status-app",
"version": "1.0.0",
"license": "MPL-2.0",
"description": "An OpenMRS seed application for building microfrontends",
"browser": "dist/openmrs-esm-template-app.js",
"description": "A microfrontend app for OpenMRS 3 to display the billing status of a patient on the patient chart",
"browser": "dist/openmrs-esm-patient-billing-status-app.js",
"main": "src/index.ts",
"source": true,
"scripts": {
Expand All @@ -30,17 +30,18 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/openmrs/openmrs-esm-template-app.git"
"url": "git+https://github.com/openmrs/openmrs-esm-patient-billing-status-app.git"
},
"homepage": "https://github.com/openmrs/openmrs-esm-template-app#readme",
"homepage": "https://github.com/openmrs/openmrs-esm-patient-billing-status-app#readme",
"publishConfig": {
"access": "public"
},
"bugs": {
"url": "https://github.com/openmrs/openmrs-esm-template-app/issues"
"url": "https://github.com/openmrs/openmrs-esm-patient-billing-status-app/issues"
},
"dependencies": {
"@carbon/react": "^1.33.1",
"classnames": "^2.3.2",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
Expand All @@ -53,6 +54,7 @@
},
"devDependencies": {
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
"@openmrs/esm-styleguide": "next",
"@playwright/test": "^1.42.1",
"@swc/cli": "^0.3.12",
Expand Down Expand Up @@ -92,10 +94,12 @@
"react-router-dom": "^6.14.1",
"rxjs": "^6.6.7",
"swc-loader": "^0.2.3",
"swr": "^2.2.4",
"turbo": "^2.0.9",
"typescript": "^4.9.5",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
},
"lint-staged": {
"packages/**/src/**/*.{ts,tsx}": "eslint --cache --fix --max-warnings 0",
Expand Down
15 changes: 0 additions & 15 deletions src/boxes/extensions/blue-box.component.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/boxes/extensions/box.scss

This file was deleted.

15 changes: 0 additions & 15 deletions src/boxes/extensions/brand-box.component.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions src/boxes/extensions/red-box.component.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/boxes/slot/boxes.component.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/boxes/slot/boxes.scss

This file was deleted.

Loading
Loading