-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opd package on the ohri clinical views (#1827)
* opd package on the ohri clinical views * package.json * update dependencies * yarn lock * remove unused transations
- Loading branch information
1 parent
28ee703
commit b695910
Showing
14 changed files
with
378 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "@ohri/openmrs-esm-ohri-opd-app", | ||
"version": "2.2.0", | ||
"description": "opd active visits", | ||
"browser": "dist/openmrs-esm-ohri-opd-app.js", | ||
"main": "src/index.ts", | ||
"license": "MIT", | ||
"homepage": "https://github.com/UCSF-IGHS/openmrs-esm-ohri#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 tsx", | ||
"typescript": "tsc", | ||
"prepublishOnly": "npm run build", | ||
"extract-translations": "i18next 'src/**/*.component.tsx'" | ||
}, | ||
"browserslist": [ | ||
"extends browserslist-config-openmrs" | ||
], | ||
"keywords": [ | ||
"openmrs", | ||
"ohri", | ||
"opd" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/UCSF-IGHS/openmrs-esm-ohri.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/UCSF-IGHS/openmrs-esm-ohri/issues" | ||
}, | ||
"dependencies": { | ||
"@carbon/react": "^1.13.0", | ||
"@ohri/esm-patient-chart-app": "7.1.0-2" | ||
}, | ||
"peerDependencies": { | ||
"@ohri/esm-patient-chart-app": "7.1.0-2", | ||
"@openmrs/esm-framework": "5.x", | ||
"@openmrs/esm-patient-common-lib": "6.x", | ||
"dayjs": "1.x", | ||
"react": "18.x", | ||
"react-i18next": "11.x", | ||
"swr": "2.x" | ||
}, | ||
"devDependencies": { | ||
"@ohri/esm-patient-chart-app": "7.1.0-2", | ||
"webpack": "^5.88.2" | ||
} | ||
} |
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 @@ | ||
export const configSchema = {}; |
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,12 @@ | ||
export const opdFolderMeta = { | ||
title: 'OPD', | ||
slotName: 'opd-slot', | ||
isExpanded: false, | ||
}; | ||
|
||
export const activeVisitDashboardMeta = { | ||
slot: 'patient-chart-active-visit-dashboard-slot', | ||
columns: 1, | ||
path: 'Active Visits', | ||
title: 'Active Visits', | ||
}; |
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,21 @@ | ||
@import "./root.scss"; | ||
|
||
.noMarker { | ||
list-style-type: none; | ||
} | ||
|
||
.noMarker ul li a { | ||
padding-left: 40px !important; | ||
font: lighter; | ||
} | ||
|
||
.currentNavItem > a { | ||
background-color: #cecece !important; | ||
color: #161616 !important; | ||
border-left-color: var(--brand-01) !important; | ||
font: bolder; | ||
} | ||
|
||
.hide { | ||
display: none; | ||
} |
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,2 @@ | ||
declare module '*.css'; | ||
declare module '*.scss'; |
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,30 @@ | ||
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle, registerFeatureFlag } from '@openmrs/esm-framework'; | ||
import { opdFolderMeta } from './dashboard.meta'; | ||
import { createDashboardGroup, createDashboardLink } from '@openmrs/esm-patient-common-lib'; | ||
import { configSchema } from './config-schema'; | ||
import { activeVisitDashboardMeta } from '@ohri/esm-patient-chart-app/src/dashboard.meta'; | ||
|
||
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
|
||
require('./root.scss'); | ||
|
||
export const moduleName = '@ohri/openmrs-esm-ohri-opd-app'; | ||
|
||
const options = { | ||
featureName: 'ohri-opd', | ||
moduleName, | ||
}; | ||
|
||
export function startupApp() { | ||
defineConfigSchema(moduleName, configSchema); | ||
} | ||
|
||
export const opdPatientChartDashboard = getSyncLifecycle(createDashboardGroup(opdFolderMeta), options); | ||
|
||
export const activeVisitDashboardLink = getSyncLifecycle( | ||
createDashboardLink({ | ||
...activeVisitDashboardMeta, | ||
moduleName, | ||
}), | ||
{ featureName: 'active-visit', moduleName }, | ||
); |
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,116 @@ | ||
@use '@carbon/styles/scss/spacing'; | ||
@use '@carbon/styles/scss/type'; | ||
@import '~@openmrs/esm-styleguide/src/vars'; | ||
|
||
$ui-01: #f4f4f4; | ||
$ui-02: #ffffff; | ||
$ui-03: #e0e0e0; | ||
$ui-05: #161616; | ||
$ui-background: #ffffff; | ||
$color-gray-70: #525252; | ||
$color-blue-60-2: #0f62fe; | ||
$color-yellow-50: #feecae; | ||
$inverse-support-03: #f1c21b; | ||
$warning-background: #fff8e1; | ||
$openmrs-background-grey: #f4f4f4; | ||
$danger: #da1e28; | ||
$interactive-01: #0f62fe; | ||
$brand-teal-01: #3197D9; | ||
$ohri-input-width: 22.313rem; | ||
$ohri-home-background: #ededed; | ||
$button-primary: #0078A6; | ||
|
||
.productiveHeading01 { | ||
@include type.type-style("heading-compact-01"); | ||
} | ||
|
||
.productiveHeading02 { | ||
@include type.type-style("heading-compact-02"); | ||
} | ||
|
||
.productiveHeading03 { | ||
@include type.type-style("heading-03"); | ||
} | ||
|
||
.productiveHeading04 { | ||
@include type.type-style("heading-04"); | ||
} | ||
|
||
.productiveHeading05 { | ||
@include type.type-style("heading-05"); | ||
} | ||
|
||
.productiveHeading06 { | ||
@include type.type-style("heading-06"); | ||
} | ||
|
||
.bodyShort01 { | ||
@include type.type-style("body-compact-01"); | ||
} | ||
|
||
.helperText01 { | ||
@include type.type-style("helper-text-01"); | ||
} | ||
|
||
.bodyShort02 { | ||
@include type.type-style("body-compact-02"); | ||
} | ||
|
||
.bodyLong01 { | ||
@include type.type-style("body-01"); | ||
} | ||
|
||
.bodyLong02 { | ||
@include type.type-style("body-02"); | ||
} | ||
|
||
.label01 { | ||
@include type.type-style("label-01"); | ||
} | ||
|
||
.text02 { | ||
color: $text-02; | ||
} | ||
|
||
aside { | ||
background-color: $ui-02 !important; | ||
} | ||
|
||
// Login Overrides | ||
|
||
div[class*='-esm-login__styles__center'] > img { | ||
width: 140px; // design has 120px | ||
} | ||
|
||
:global(.tab-12rem) > button { | ||
width: 12rem !important; | ||
} | ||
|
||
:global(.tab-14rem) > button { | ||
width: 14rem !important; | ||
} | ||
|
||
:global(.tab-16rem) > button { | ||
width: 16rem !important; | ||
} | ||
|
||
:global(.cds--overflow-menu) > div { | ||
width: 15rem !important; | ||
} | ||
|
||
nav :global(.cds--accordion__title) { | ||
color: #525252; | ||
font-weight: 600 !important; | ||
} | ||
|
||
nav :global(.cds--accordion__content) { | ||
padding-bottom: 0 !important; | ||
padding-top: 0 !important; | ||
} | ||
|
||
nav :global(.cds--accordion__content) > a { | ||
background-color: #cecece !important; | ||
color: #161616 !important; | ||
border-left-color: var(--brand-01) !important; | ||
font: bolder; | ||
} |
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,38 @@ | ||
{ | ||
"$schema": "https://json.openmrs.org/routes.schema.json", | ||
"backendDependencies": { | ||
"webservices.rest": "^2.24.0" | ||
}, | ||
"pages": [ | ||
], | ||
"extensions": [ | ||
{ | ||
"name": "opd", | ||
"slot": "patient-chart-dashboard-slot", | ||
"component": "opdPatientChartDashboard", | ||
"order": 25, | ||
"meta": { | ||
"path": "OPD", | ||
"slot": "opd-slot", | ||
"isExpanded": false | ||
} | ||
}, | ||
{ | ||
"name": "active-visit-summary-dashboard", | ||
"component": "activeVisitDashboardLink", | ||
"slot": "opd-slot", | ||
"meta": { | ||
"slot": "patient-chart-active-visit-dashboard-slot", | ||
"columns": 1, | ||
"path": "Active Visits" | ||
} | ||
}, | ||
{ | ||
"name": "opd-summary-ext", | ||
"slot": "opd-summary-slot", | ||
"component": "opdSummaryDashboard" | ||
} | ||
|
||
|
||
] | ||
} |
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,15 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
declare global { | ||
interface Window { | ||
openmrsBase: string; | ||
spaBase: string; | ||
} | ||
} | ||
|
||
const { getComputedStyle } = window; | ||
window.getComputedStyle = (element) => getComputedStyle(element); | ||
window.openmrsBase = '/openmrs'; | ||
window.spaBase = '/spa'; | ||
window.getOpenmrsSpaBase = () => '/openmrs/spa/'; | ||
window.HTMLElement.prototype.scrollIntoView = jest.fn(); |
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 @@ | ||
{} |
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,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"allowSyntheticDefaultImports": true, | ||
"jsx": "react", | ||
"skipLibCheck": true, | ||
"moduleResolution": "node", | ||
"lib": [ | ||
"dom", | ||
"es5", | ||
"scripthost", | ||
"es2015", | ||
"es2015.promise", | ||
"es2016.array.include", | ||
"es2018", | ||
"es2020" | ||
], | ||
"resolveJsonModule": true, | ||
"noEmit": true, | ||
"target": "esnext", | ||
"paths": { | ||
"@openmrs/*": [ | ||
"./node_modules/@openmrs/*" | ||
] | ||
} | ||
} | ||
} |
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,17 @@ | ||
const path = require('path'); | ||
const config = (module.exports = require('openmrs/default-webpack-config')); | ||
config.scriptRuleConfig.exclude = | ||
path.sep == '/' | ||
? /(node_modules[^\/@openmrs\/esm\-patient\-common\-lib])/ | ||
: /(node_modules[^\\@openmrs\/esm\-patient\-common\-lib])/; | ||
|
||
// Temporary fix to resolve webpack issues with imports from the commons library | ||
config.overrides.resolve = { | ||
extensions: ['.tsx', '.ts', '.jsx', '.js', '.scss'], | ||
alias: { | ||
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal', | ||
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'), | ||
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index', | ||
}, | ||
}; | ||
module.exports = config; |
Oops, something went wrong.