generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add medical supply order type flow to the order basket
- Loading branch information
1 parent
d51344e
commit 17be659
Showing
41 changed files
with
2,427 additions
and
869 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "@openmrs/esm-template-app", | ||
"name": "@openmrs/esm-patient-medical-supply-orders-app", | ||
"version": "4.0.0", | ||
"license": "MPL-2.0", | ||
"description": "An OpenMRS seed application for building microfrontends", | ||
"browser": "dist/openmrs-esm-template-app.js", | ||
"browser": "dist/openmrs-esm-patient-medical-supply-orders-app.js", | ||
"main": "src/index.ts", | ||
"source": true, | ||
"scripts": { | ||
|
@@ -30,29 +30,36 @@ | |
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/openmrs/openmrs-esm-template-app.git" | ||
"url": "git+https://github.com/openmrs/openmrsesm-patient-medical-supply-orders-app.git" | ||
}, | ||
"homepage": "https://github.com/openmrs/openmrs-esm-template-app#readme", | ||
"homepage": "https://github.com/openmrs/openmrsesm-patient-medical-supply-orders-app#readme", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/openmrs/openmrs-esm-template-app/issues" | ||
"url": "https://github.com/openmrs/openmrsesm-patient-medical-supply-orders-app/issues" | ||
}, | ||
"dependencies": { | ||
"@carbon/react": "^1.68.0", | ||
"lodash-es": "^4.17.21" | ||
"@hookform/resolvers": "^3.9.1", | ||
"lodash-es": "^4.17.21", | ||
"react-hook-form": "^7.53.2", | ||
"zod": "^3.23.8" | ||
}, | ||
"peerDependencies": { | ||
"@openmrs/esm-framework": "*", | ||
"@carbon/react": "^1.x", | ||
"@openmrs/esm-framework": "5.x", | ||
"@openmrs/esm-patient-common-lib": "8.x", | ||
"dayjs": "1.x", | ||
"react": "18.x", | ||
"react-i18next": "11.x", | ||
"react-router-dom": "6.x", | ||
"rxjs": "6.x" | ||
"rxjs": "6.x", | ||
"swr": "2.x" | ||
}, | ||
"devDependencies": { | ||
"@carbon/react": "^1.71.0", | ||
"@openmrs/esm-framework": "next", | ||
"@openmrs/esm-patient-common-lib": "next", | ||
"@openmrs/esm-styleguide": "next", | ||
"@playwright/test": "^1.42.1", | ||
"@swc/cli": "^0.3.12", | ||
|
@@ -93,6 +100,7 @@ | |
"react-router-dom": "^6.14.1", | ||
"rxjs": "^6.6.7", | ||
"swc-loader": "^0.2.3", | ||
"swr": "^2.2.5", | ||
"turbo": "^2.2.3", | ||
"typescript": "^4.9.5", | ||
"webpack": "^5.88.1", | ||
|
@@ -102,5 +110,8 @@ | |
"packages/**/src/**/*.{ts,tsx}": "eslint --cache --fix --max-warnings 0", | ||
"*.{css,scss,ts,tsx}": "prettier --write --list-different" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"resolutions": { | ||
"@openmrs/esm-patient-common-lib": "portal:/Users/vasharma05/Projects/patient-chart/packages/esm-patient-common-lib" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,43 +1,72 @@ | ||
import { Type, validator } from '@openmrs/esm-framework'; | ||
import { Type, validator, validators } from '@openmrs/esm-framework'; | ||
import _default from 'react-hook-form/dist/utils/createSubject'; | ||
|
||
/** | ||
* This is the config schema. It expects a configuration object which | ||
* looks like this: | ||
* | ||
* ```json | ||
* { "casualGreeting": true, "whoToGreet": ["Mom"] } | ||
* ``` | ||
* | ||
* In OpenMRS Microfrontends, all config parameters are optional. Thus, | ||
* all elements must have a reasonable default. A good default is one | ||
* that works well with the reference application. | ||
* | ||
* To understand the schema below, please read the configuration system | ||
* documentation: | ||
* https://openmrs.github.io/openmrs-esm-core/#/main/config | ||
* Note especially the section "How do I make my module configurable?" | ||
* https://openmrs.github.io/openmrs-esm-core/#/main/config?id=im-developing-an-esm-module-how-do-i-make-it-configurable | ||
* and the Schema Reference | ||
* https://openmrs.github.io/openmrs-esm-core/#/main/config?id=schema-reference | ||
*/ | ||
export const configSchema = { | ||
casualGreeting: { | ||
_type: Type.Boolean, | ||
_default: false, | ||
_description: 'Whether to use a casual greeting (or a formal one).', | ||
}, | ||
whoToGreet: { | ||
orderTypes: { | ||
_type: Type.Array, | ||
_default: ['World'], | ||
_description: 'Who should be greeted. Names will be separated by a comma and space.', | ||
_elements: { | ||
_type: Type.String, | ||
_type: Type.Object, | ||
orderTypeUuid: { | ||
_type: Type.UUID, | ||
_description: 'The UUID of the order type with the listed in the order basket', | ||
}, | ||
orderableConceptClasses: { | ||
_type: Type.Array, | ||
_description: | ||
'The concept class of the orderable concepts. By default it will look for concept class in the order type response', | ||
_elements: { | ||
_type: Type.UUID, | ||
}, | ||
}, | ||
orderableConceptSets: { | ||
_type: Type.Array, | ||
_description: | ||
"UUIDs of concepts that represent orderable concepts. Either the `conceptClass` should be given, or the `orderableConcepts`. If the orderableConcepts are not given, then it'll search concepts by concept class.", | ||
_elements: { | ||
_type: Type.UUID, | ||
}, | ||
}, | ||
}, | ||
_default: [ | ||
{ | ||
orderTypeUuid: '67a92bd6-0f88-11ea-8d71-362b9e155667', | ||
orderableConceptClasses: [], | ||
orderableConceptSets: [], | ||
}, | ||
], | ||
}, | ||
quantityUnits: { | ||
_type: Type.Object, | ||
_description: 'Concept to be used for fetching quantity units', | ||
_default: { | ||
conceptUuid: '162402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', | ||
map: 'setMembers', | ||
}, | ||
// _elements: { | ||
conceptUuid: { | ||
_type: Type.UUID, | ||
_description: 'UUID for the quantity units concepts', | ||
_default: '162402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', | ||
}, | ||
map: { | ||
_type: Type.UUID, | ||
_description: | ||
"Whether to use the concept answers of the setMembers of the concept. One of 'answers' or 'setMembers'.", | ||
_default: 'setMembers', | ||
_validators: [validators.oneOf(['answers', 'setMembers'])], | ||
}, | ||
_validators: [validator((v) => v.length > 0, 'At least one person must be greeted.')], | ||
}, | ||
// }, | ||
}; | ||
|
||
export type Config = { | ||
casualGreeting: boolean; | ||
whoToGreet: Array<string>; | ||
export type ConfigObject = { | ||
orderTypes: Array<{ | ||
orderTypeUuid: string; | ||
orderableConceptClasses: Array<string>; | ||
orderableConceptSets: Array<string>; | ||
}>; | ||
quantityUnits: { | ||
conceptUuid: string; | ||
map: 'answers' | 'setMembers'; | ||
}; | ||
}; |
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 moduleName = '@openmrs/esm-patient-medical-supply-orders-app'; |
Oops, something went wrong.