Skip to content

Commit

Permalink
Initial Commit on Clinical View module (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel090 authored Dec 11, 2023
1 parent ec602ae commit c2b419a
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 0 deletions.
49 changes: 49 additions & 0 deletions packages/esm-patient-clinical-view-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@kenyaemr/esm-patient-clinical-view-app",
"version": "5.1.0",
"description": "Patient clinical view microfrontend for the OpenMRS SPA",
"browser": "dist/kenyaemr-esm-patient-clinical-view-app.js",
"main": "src/index.ts",
"source": true,
"license": "MPL-2.0",
"homepage": "https://github.com/palladiumkenya/kenyaemr-esm-core#readme",
"scripts": {
"start": "openmrs develop",
"serve": "webpack serve --mode=development",
"debug": "npm run serve",
"build": "webpack --mode production",
"analyze": "webpack --mode=production --env.analyze=true",
"lint": "eslint src --ext ts,tsx",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx'"
},
"browserslist": [
"extends browserslist-config-openmrs"
],
"keywords": [
"openmrs"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/palladiumkenya/kenyaemr-esm-core#readme"
},
"bugs": {
"url": "https://github.com/palladiumkenya/kenyaemr-esm-core/issues"
},
"dependencies": {
"@carbon/react": "^1.42.1",
"lodash-es": "^4.17.15"
},
"peerDependencies": {
"@openmrs/esm-framework": "5.x",
"react": "^18.1.0",
"react-i18next": "11.x",
"react-router-dom": "6.x"
},
"devDependencies": {
"webpack": "^5.74.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const configSchema = {};
4 changes: 4 additions & 0 deletions packages/esm-patient-clinical-view-app/src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.css';
declare module '*.scss';
declare module '@carbon/react';
declare type SideNavProps = object;
15 changes: 15 additions & 0 deletions packages/esm-patient-clinical-view-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfigSchema, getAsyncLifecycle } from '@openmrs/esm-framework';
import { configSchema } from './config-schema';
import { createDashboardLink, registerWorkspace } from '@openmrs/esm-patient-common-lib';

const moduleName = '@kenyaemr/esm-patient-clinical-view-app';

const options = {
featureName: 'patient-clinical-view-app',
moduleName,
};
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');

export function startupApp() {
defineConfigSchema(moduleName, configSchema);
}
8 changes: 8 additions & 0 deletions packages/esm-patient-clinical-view-app/src/root.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import { BrowserRouter } from 'react-router-dom';

const Root: React.FC = () => {
return <BrowserRouter basename={`${window['getOpenmrsSpaBase']()}`}></BrowserRouter>;
};

export default Root;
10 changes: 10 additions & 0 deletions packages/esm-patient-clinical-view-app/src/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.openmrs.org/routes.schema.json",
"backendDependencies": {
"kenyaemr": "^18.2.0"
},
"pages": [],
"extensions": [

]
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 5 additions & 0 deletions packages/esm-patient-clinical-view-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"exclude": ["src/**/*.test.tsx"]
}
1 change: 1 addition & 0 deletions packages/esm-patient-clinical-view-app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('openmrs/default-webpack-config');
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,21 @@ __metadata:
languageName: unknown
linkType: soft

"@kenyaemr/esm-patient-clinical-view-app@workspace:packages/esm-patient-clinical-view-app":
version: 0.0.0-use.local
resolution: "@kenyaemr/esm-patient-clinical-view-app@workspace:packages/esm-patient-clinical-view-app"
dependencies:
"@carbon/react": "npm:^1.42.1"
lodash-es: "npm:^4.17.15"
webpack: "npm:^5.74.0"
peerDependencies:
"@openmrs/esm-framework": 5.x
react: ^18.1.0
react-i18next: 11.x
react-router-dom: 6.x
languageName: unknown
linkType: soft

"@kenyaemr/esm-patient-flags-app@workspace:packages/esm-patient-flags-app":
version: 0.0.0-use.local
resolution: "@kenyaemr/esm-patient-flags-app@workspace:packages/esm-patient-flags-app"
Expand Down

0 comments on commit c2b419a

Please sign in to comment.