@kenyaemr/esm-bed-management-app 1.0.1-pre.7 → 8.0.3-pre.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +36 -0
- package/README.md +6 -38
- package/dist/130.js +2 -0
- package/dist/{800.js.LICENSE.txt → 130.js.LICENSE.txt} +2 -0
- package/dist/130.js.map +1 -0
- package/dist/148.js +1 -0
- package/dist/148.js.map +1 -0
- package/dist/169.js +1 -0
- package/dist/169.js.map +1 -0
- package/dist/271.js +1 -0
- package/dist/319.js +1 -0
- package/dist/325.js +1 -0
- package/dist/325.js.map +1 -0
- package/dist/339.js +1 -0
- package/dist/339.js.map +1 -0
- package/dist/455.js +1 -1
- package/dist/455.js.LICENSE.txt +6 -0
- package/dist/455.js.map +1 -1
- package/dist/460.js +1 -0
- package/dist/501.js +1 -0
- package/dist/501.js.map +1 -0
- package/dist/542.js +1 -0
- package/dist/542.js.map +1 -0
- package/dist/574.js +1 -1
- package/dist/591.js +2 -0
- package/dist/{26.js.LICENSE.txt → 591.js.LICENSE.txt} +3 -3
- package/dist/591.js.map +1 -0
- package/dist/644.js +1 -0
- package/dist/757.js +1 -0
- package/dist/766.js +2 -0
- package/dist/{330.js.LICENSE.txt → 766.js.LICENSE.txt} +0 -9
- package/dist/766.js.map +1 -0
- package/dist/{294.js → 784.js} +2 -2
- package/dist/{294.js.map → 784.js.map} +1 -1
- package/dist/788.js +1 -0
- package/dist/807.js +1 -0
- package/dist/833.js +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-bed-management-app.js +1 -0
- package/dist/{esm-kenyaemr-bed-management-app.js.buildmanifest.json → openmrs-esm-bed-management-app.js.buildmanifest.json} +202 -155
- package/dist/openmrs-esm-bed-management-app.js.map +1 -0
- package/dist/routes.json +1 -1
- package/jest.config.js +3 -0
- package/package-lock.json +5893 -0
- package/package.json +25 -82
- package/src/__mocks__/react-i18next.js +18 -14
- package/src/admin-card-link.component.tsx +7 -10
- package/src/bed-administration/bed-administration-form.component.tsx +65 -99
- package/src/bed-administration/bed-administration-table.component.tsx +68 -127
- package/src/bed-administration/bed-administration-table.scss +12 -16
- package/src/bed-administration/bed-administration.resource.ts +16 -18
- package/src/bed-administration/edit-bed-form.component.tsx +20 -31
- package/src/bed-administration/new-bed-form.component.tsx +28 -44
- package/src/{bed-admission/bed-tag → bed-tag}/bed-tag-administration-table.component.tsx +35 -60
- package/src/{bed-admission/bed-tag → bed-tag}/bed-tags-admin-form.component.tsx +30 -34
- package/src/{bed-admission/bed-tag → bed-tag}/edit-tag-form.component.tsx +17 -25
- package/src/{bed-admission/bed-tag → bed-tag}/new-tag-form.component.tsx +20 -27
- package/src/{bed-admission/bed-type → bed-type}/bed-type-admin-form.component.tsx +37 -44
- package/src/{bed-admission/bed-type → bed-type}/bed-type-administration-table.component.tsx +36 -60
- package/src/{bed-admission/bed-type → bed-type}/edit-bed-type.component.tsx +17 -25
- package/src/{bed-admission/bed-type → bed-type}/new-bed-type-form.component.tsx +21 -28
- package/src/card-header/card-header.component.tsx +20 -0
- package/src/card-header/card-header.scss +45 -0
- package/src/config-schema.ts +9 -17
- package/src/declarations.d.ts +5 -5
- package/src/empty-state/empty-state.component.tsx +6 -21
- package/src/empty-state/empty-state.scss +10 -10
- package/src/header/header.component.tsx +14 -23
- package/src/header/header.scss +11 -11
- package/src/header/illustration.component.tsx +3 -3
- package/src/home.component.tsx +4 -4
- package/src/index.ts +21 -48
- package/src/left-panel/left-panel.component.tsx +7 -17
- package/src/left-panel/left-panel.scss +8 -7
- package/src/left-panel-link.component.tsx +14 -24
- package/src/root.component.tsx +12 -12
- package/src/root.scss +2 -2
- package/src/routes.json +12 -12
- package/src/setup-tests.ts +1 -1
- package/src/summary/summary.component.tsx +16 -30
- package/src/summary/summary.resource.ts +116 -95
- package/src/summary/summary.scss +31 -29
- package/src/types.ts +50 -40
- package/src/ward-card/ward-card.component.tsx +5 -12
- package/src/ward-card/ward-card.scss +2 -2
- package/src/ward-with-beds/ward-with-beds.component.tsx +28 -47
- package/src/ward-with-beds/ward-with-beds.scss +5 -5
- package/translations/am.json +51 -0
- package/translations/ar.json +51 -0
- package/translations/en.json +48 -4
- package/translations/es.json +51 -0
- package/translations/fr.json +51 -0
- package/translations/he.json +51 -0
- package/translations/km.json +51 -0
- package/translations/zh.json +51 -0
- package/translations/zh_CN.json +51 -0
- package/tsconfig.json +3 -21
- package/webpack.config.js +1 -1
- package/.editorconfig +0 -12
- package/.eslintignore +0 -2
- package/.eslintrc +0 -37
- package/.husky/pre-commit +0 -4
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.prettierignore +0 -14
- package/.turbo.json +0 -18
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
- package/.yarn/plugins/@yarnpkg/plugin-version.cjs +0 -550
- package/.yarn/versions/cb9a89ac.yml +0 -0
- package/LICENSE +0 -373
- package/dist/187.js +0 -1
- package/dist/187.js.map +0 -1
- package/dist/207.js +0 -1
- package/dist/207.js.map +0 -1
- package/dist/26.js +0 -2
- package/dist/26.js.map +0 -1
- package/dist/283.js +0 -1
- package/dist/283.js.map +0 -1
- package/dist/330.js +0 -2
- package/dist/330.js.map +0 -1
- package/dist/352.js +0 -1
- package/dist/352.js.map +0 -1
- package/dist/404.js +0 -1
- package/dist/404.js.map +0 -1
- package/dist/558.js +0 -2
- package/dist/558.js.LICENSE.txt +0 -14
- package/dist/558.js.map +0 -1
- package/dist/629.js +0 -1
- package/dist/629.js.map +0 -1
- package/dist/707.js +0 -1
- package/dist/707.js.map +0 -1
- package/dist/800.js +0 -2
- package/dist/800.js.map +0 -1
- package/dist/850.js +0 -1
- package/dist/850.js.map +0 -1
- package/dist/884.js +0 -1
- package/dist/884.js.map +0 -1
- package/dist/933.js +0 -1
- package/dist/933.js.map +0 -1
- package/dist/esm-kenyaemr-bed-management-app.js +0 -1
- package/dist/esm-kenyaemr-bed-management-app.js.map +0 -1
- package/i18next-parser.config.js +0 -89
- package/src/assets/landing-page.png +0 -0
- package/src/assets/logo.svg +0 -1
- package/src/bed-admission/active-patients/active-patients-table.component.tsx +0 -299
- package/src/bed-admission/active-patients/active-visits.resource.ts +0 -171
- package/src/bed-admission/active-patients/admission-action-button-styles.scss +0 -0
- package/src/bed-admission/active-patients/admission-action-button.component.tsx +0 -26
- package/src/bed-admission/active-patients/index.tsx +0 -15
- package/src/bed-admission/active-patients/patient-queues.resource.ts +0 -136
- package/src/bed-admission/active-patients/styles.scss +0 -284
- package/src/bed-admission/active-patients/view-action-menu.component.tsx +0 -33
- package/src/bed-admission/admitted-patients/active-admissions.resource.ts +0 -121
- package/src/bed-admission/admitted-patients/admitted-patients-table.component.tsx +0 -280
- package/src/bed-admission/admitted-patients/admitted-patients.component.tsx +0 -22
- package/src/bed-admission/admitted-patients/location-combo-box.component.tsx +0 -55
- package/src/bed-admission/admitted-patients/styles.scss +0 -284
- package/src/bed-admission/bed-admission-tabs-styles.scss +0 -30
- package/src/bed-admission/bed-admission-tabs.component.tsx +0 -69
- package/src/bed-admission/bed-admission.component.tsx +0 -15
- package/src/bed-admission/bed-admission.resource.ts +0 -35
- package/src/bed-admission/bed-layout/bed-layout-list.component.tsx +0 -101
- package/src/bed-admission/bed-layout/bed-layout.component.tsx +0 -64
- package/src/bed-admission/bed-layout/bed-layout.scss +0 -118
- package/src/bed-admission/bed-layout/min-bed-layout.component.tsx +0 -26
- package/src/bed-admission/createDashboardLink.tsx +0 -47
- package/src/bed-admission/discharged-patients/discharged-patients.componet.tsx +0 -19
- package/src/bed-admission/helpers/functions.ts +0 -102
- package/src/bed-admission/types.ts +0 -133
- package/src/workspace/allocate-bed-workspace.component.tsx +0 -141
- package/src/workspace/allocate-bed.scss +0 -117
- package/src/workspace/overlay.component.tsx +0 -55
- package/src/workspace/overlay.scss +0 -96
- /package/dist/{294.js.LICENSE.txt → 784.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C,SAAW/F,EAASA,EAC9D,CAEF,EAcF,IAAIyG,EAAuB,CAACC,EAA4BC,KACvD,IAGI7H,EAAUkB,GAHT4G,EAAUC,EAAaC,GAAWH,EAGhBpF,EAAI,EAC3B,GAAGqF,EAASG,MAAM/H,GAAgC,IAAxBgH,EAAgBhH,KAAa,CACtD,IAAIF,KAAY+H,EACZlJ,EAAoBM,EAAE4I,EAAa/H,KACrCnB,EAAoByB,EAAEN,GAAY+H,EAAY/H,IAG7CgI,GAAsBA,EAAQnJ,EAClC,CAEA,IADG+I,GAA4BA,EAA2BC,GACrDpF,EAAIqF,EAASpF,OAAQD,IACzBvB,EAAU4G,EAASrF,GAChB5D,EAAoBM,EAAE+H,EAAiBhG,IAAYgG,EAAgBhG,IACrEgG,EAAgBhG,GAAS,KAE1BgG,EAAgBhG,GAAW,CAC5B,EAIGgH,EAAqB1G,WAAyD,6CAAIA,WAAyD,8CAAK,GACpJ0G,EAAmBtE,QAAQ+D,EAAqB5D,KAAK,KAAM,IAC3DmE,EAAmB/F,KAAOwF,EAAqB5D,KAAK,KAAMmE,EAAmB/F,KAAK4B,KAAKmE,G,KCrFvFrJ,EAAoBmE,QAAK1D,ECGzB,IAAI6I,EAAsBtJ,EAAoB,M","sources":["webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/load script","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/consumes","webpack://@kenyaemr/esm-bed-management-app/webpack/container-entry","webpack://@kenyaemr/esm-bed-management-app/webpack/bootstrap","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/compat get default export","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/define property getters","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/ensure chunk","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/get javascript chunk filename","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/global","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/hasOwnProperty shorthand","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/make namespace object","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/node module decorator","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/sharing","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/publicPath","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/jsonp chunk loading","webpack://@kenyaemr/esm-bed-management-app/webpack/runtime/nonce","webpack://@kenyaemr/esm-bed-management-app/webpack/startup"],"names":["inProgress","dataWebpackPrefix","parseVersion","versionLt","rangeToString","satisfy","findSingletonVersionKey","getInvalidSingletonVersionMessage","getSingleton","getSingletonVersion","warn","get","init","loadSingletonFallback","loadSingletonVersionCheckFallback","installedModules","moduleToHandlerMapping","chunkMapping","moduleMap","Promise","all","__webpack_require__","e","then","module","getScope","R","o","resolve","Error","undefined","shareScope","initScope","S","name","oldScope","I","d","exports","__webpack_module_cache__","moduleId","cachedModule","id","loaded","__webpack_modules__","call","m","c","n","getter","__esModule","a","definition","key","Object","defineProperty","enumerable","f","chunkId","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","nmd","paths","children","initPromises","initTokens","initToken","indexOf","scope","uniqueName","register","version","factory","eager","versions","activeVersion","from","scriptUrl","importScripts","location","currentScript","replace","p","str","split","map","exec","apply","b","t","range","pop","requiredVersion","scopeName","msg","console","entry","promise","fallback","consumes","onFactory","onError","error","installedChunks","j","installedChunkData","test","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
|
package/i18next-parser.config.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
contextSeparator: "_",
|
|
3
|
-
// Key separator used in your translation keys
|
|
4
|
-
|
|
5
|
-
createOldCatalogs: false,
|
|
6
|
-
// Save the \_old files
|
|
7
|
-
|
|
8
|
-
defaultNamespace: "translations",
|
|
9
|
-
// Default namespace used in your i18next config
|
|
10
|
-
|
|
11
|
-
defaultValue: "",
|
|
12
|
-
// Default value to give to empty keys
|
|
13
|
-
// You may also specify a function accepting the locale, namespace, and key as arguments
|
|
14
|
-
|
|
15
|
-
indentation: 2,
|
|
16
|
-
// Indentation of the catalog files
|
|
17
|
-
|
|
18
|
-
keepRemoved: false,
|
|
19
|
-
// Keep keys from the catalog that are no longer in code
|
|
20
|
-
|
|
21
|
-
keySeparator: ".",
|
|
22
|
-
// Key separator used in your translation keys
|
|
23
|
-
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
|
|
24
|
-
|
|
25
|
-
// see below for more details
|
|
26
|
-
lexers: {
|
|
27
|
-
hbs: ["HandlebarsLexer"],
|
|
28
|
-
handlebars: ["HandlebarsLexer"],
|
|
29
|
-
|
|
30
|
-
htm: ["HTMLLexer"],
|
|
31
|
-
html: ["HTMLLexer"],
|
|
32
|
-
|
|
33
|
-
mjs: ["JavascriptLexer"],
|
|
34
|
-
js: ["JavascriptLexer"], // if you're writing jsx inside .js files, change this to JsxLexer
|
|
35
|
-
ts: ["JavascriptLexer"],
|
|
36
|
-
jsx: ["JsxLexer"],
|
|
37
|
-
tsx: ["JsxLexer"],
|
|
38
|
-
|
|
39
|
-
default: ["JavascriptLexer"],
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
lineEnding: "auto",
|
|
43
|
-
// Control the line ending. See options at https://github.com/ryanve/eol
|
|
44
|
-
|
|
45
|
-
locales: ["en"],
|
|
46
|
-
// An array of the locales in your applications
|
|
47
|
-
|
|
48
|
-
namespaceSeparator: ":",
|
|
49
|
-
// Namespace separator used in your translation keys
|
|
50
|
-
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
|
|
51
|
-
|
|
52
|
-
output: "$NAMESPACE/$LOCALE.json",
|
|
53
|
-
// Supports $LOCALE and $NAMESPACE injection
|
|
54
|
-
// Supports JSON (.json) and YAML (.yml) file formats
|
|
55
|
-
// Where to write the locale files relative to process.cwd()
|
|
56
|
-
|
|
57
|
-
pluralSeparator: "_",
|
|
58
|
-
// Plural separator used in your translation keys
|
|
59
|
-
// If you want to use plain english keys, separators such as `_` might conflict. You might want to set `pluralSeparator` to a different string that does not occur in your keys.
|
|
60
|
-
|
|
61
|
-
input: undefined,
|
|
62
|
-
// An array of globs that describe where to look for source files
|
|
63
|
-
// relative to the location of the configuration file
|
|
64
|
-
|
|
65
|
-
sort: true,
|
|
66
|
-
// Whether or not to sort the catalog
|
|
67
|
-
|
|
68
|
-
useKeysAsDefaultValue: false,
|
|
69
|
-
// Whether to use the keys as the default value; ex. "Hello": "Hello", "World": "World"
|
|
70
|
-
// This option takes precedence over the `defaultValue` and `skipDefaultValues` options
|
|
71
|
-
// You may also specify a function accepting the locale and namespace as arguments
|
|
72
|
-
|
|
73
|
-
verbose: false,
|
|
74
|
-
// Display info about the parsing including some stats
|
|
75
|
-
|
|
76
|
-
failOnWarnings: false,
|
|
77
|
-
// Exit with an exit code of 1 on warnings
|
|
78
|
-
|
|
79
|
-
customValueTemplate: null,
|
|
80
|
-
// If you wish to customize the value output the value as an object, you can set your own format.
|
|
81
|
-
// ${defaultValue} is the default value you set in your translation function.
|
|
82
|
-
// Any other custom property will be automatically extracted.
|
|
83
|
-
//
|
|
84
|
-
// Example:
|
|
85
|
-
// {
|
|
86
|
-
// message: "${defaultValue}",
|
|
87
|
-
// description: "${maxLength}", // t('my-key', {maxLength: 150})
|
|
88
|
-
// }
|
|
89
|
-
};
|
|
Binary file
|
package/src/assets/logo.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="320" height="100" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#409184" d="M0 0h320v100H0z"/><g fill-rule="nonzero"><path d="M57.97 55.541c0 6.26-5.85 9.37-12.48 9.37-6.63 0-12.49-3.11-12.49-9.37v-21.19s5.56 0 5.56 2.7v17.88c0 3.73 2.86 5.68 6.93 5.68s6.93-1.95 6.93-5.68v-20.58s5.56 0 5.56 2.7v18.49h-.01Zm48.45-6.14c0-1.49-.83-2.82-4.02-2.82-3.48 0-6.64 1.2-6.64 4.69-1.2-1.62-1.58-2.9-1.58-4.02 0-3.61 4.85-4.69 8.25-4.69 6.1 0 9.33 2.57 9.33 7.09v15.18c-1.08-.54-2.16-.66-3.19-.66-2.07 0-4.15.75-6.51.75-4.27 0-8.46-1.58-8.46-6.51 0-7.76 11.12-5.73 12.82-9.01Zm.12 4.23c-.95 2.2-7.59 1-7.59 4.69 0 1.87 1.37 2.82 3.73 2.82 2.2 0 3.86-.75 3.86-.75v-6.76Zm23.27-3.61c0-2.2-1.04-3.44-3.98-3.44-2.12 0-3.94.58-3.94.58v17.54s-5.39 0-5.39-2.7v-19.44s1.62.87 3.73.87c2.03 0 3.94-.87 6.18-.87 4.27 0 8.79 1.45 8.79 6.84v15.3s-5.39-.08-5.39-2.7v-11.98Zm23.27-17.21c.37 0 5.39-.04 5.39 3.11v28.99c-1.08-.54-2.2-.71-3.32-.71-2.2 0-4.31.71-6.05.71-5.93 0-9.33-2.61-9.33-7.22v-7.96c0-4.48 3.86-7.17 8.29-7.17 3.44 0 5.35 1.62 5.35 1.62s-.33-1.37-.33-2.41v-8.96Zm0 17.13c0-2.03-2.24-3.44-4.48-3.44-1.99 0-3.44 1.16-3.44 3.86v6.72c0 2.61 1 3.9 4.44 3.9 1.87 0 3.48-.5 3.48-.5v-10.54Zm22.44-.54c0-1.49-.83-2.82-4.02-2.82-3.48 0-6.64 1.2-6.64 4.69-1.2-1.62-1.58-2.9-1.58-4.02 0-3.61 4.85-4.69 8.25-4.69 6.1 0 9.33 2.57 9.33 7.09v15.18c-1.08-.54-2.16-.66-3.19-.66-2.07 0-4.15.75-6.51.75-4.27 0-8.46-1.58-8.46-6.51 0-7.76 11.12-5.73 12.82-9.01Zm.12 4.23c-.95 2.2-7.59 1-7.59 4.69 0 1.87 1.37 2.82 3.73 2.82 2.2 0 3.86-.75 3.86-.75v-6.76Zm17.3-2.53v8.29h14.81c0 .29-.08 5.02-3.86 5.02h-12.73s-5.35 0-5.35-3.19v-26.95h21.94s0 5.06-3.86 5.06h-10.95v6.72h7.8c4.11 0 5.35-.66 5.35-.66 0 2.86-.58 5.72-4.69 5.72h-8.46v-.01Zm41.93-.16c0-2.03.54-4.65.54-4.65l-6.3 13.4s-4.31 0-6.3-3.11l-4.44-10.04s.46 2.36.46 4.4v13.89s-7.13 0-7.13-3.19v-27.37h4.4c.25 0 3.36-.04 4.65 2.78l6.1 13.52 7.63-16.3c1.58 0 7.55 0 7.55 3.19v27.37s-7.13 0-7.13-3.19v-10.7h-.03Zm27 .41c5.23 3.44 6.68 8.38 9.75 12.73 0 0-2.53.66-3.53.66-1.74 0-4.15-.54-5.64-2.95-1.7-2.7-3.82-7.92-7.92-9.7v12.73s-7.13-.12-7.13-3.19v-27.36h10.41c6.72 0 11.57 1.91 11.57 7.88v1.24c0 4.35-2.7 7.88-7.51 7.96Zm-7.34-12.03v7.51h3.61c3.03 0 4.11-1.33 4.11-4.06 0-2.7-1.45-3.44-4.44-3.44h-3.28v-.01Z" fill="#FDFFFF"/><path d="M103.92 73.601c0-.59.07-1.22.07-1.22l-3.51 7.12s-.43 0-.83-.64l-3.09-6.52s.07.67.07 1.26v8.17s-.84 0-.84-.64v-9.57h.71s.57 0 .88.68l2.87 6.1 3.26-6.77s1.25.01 1.25.64v9.57s-.84 0-.84-.64v-7.54Zm9.66 6.76c0 1-1.44 1.45-2.73 1.45-1.67 0-2.74-.83-2.74-2.25v-3.01c0-1.41.94-2.25 2.67-2.25s2.73.84 2.73 2.1c0 1.15-.78 2.03-2.8 2.03-.94 0-1.8-.38-1.8-.38v1.29c0 1.09.46 1.68 1.94 1.68 1.32 0 2.39-.52 2.39-1.59.26.35.34.65.34.93Zm-4.66-3.05c-.06.03 1 .33 1.73.33 1.54 0 2.07-.48 2.07-1.25 0-.8-.48-1.35-1.9-1.35-1.54 0-1.9.64-1.9 1.71v.56Zm12.24-6.41c.13 0 .8-.01.8.77v10.03c-.26-.1-.52-.14-.77-.14-.59 0-1.32.25-2.04.25-1.67 0-2.64-.87-2.64-2.2v-3.1c0-1.38 1.09-2.19 2.36-2.19 2.03 0 2.45.9 2.45.9s-.16-.28-.16-1.52v-2.8Zm0 5.67c0-.9-1.06-1.51-2.1-1.51-1 0-1.75.51-1.75 1.65v2.67c0 1.12.51 1.67 2.1 1.67 1.07 0 1.75-.35 1.75-.35v-4.13Zm4.1-4.72h.75c.13 0 .16.12.16.2v.8h-.75c-.09 0-.16-.1-.16-.19v-.81Zm.06 2.52c.09 0 .8.03.8.64v6.73s-.8 0-.8-.64v-6.73Zm9.58 5.97c0 1.01-1.38 1.46-2.68 1.46-1.74 0-2.88-.83-2.88-2.25v-3.01c0-1.41 1.01-2.25 2.74-2.25 1.51 0 2.51.57 2.51 1.44 0 .28-.1.58-.32.87 0-.91-.81-1.52-2.22-1.52-1.48 0-1.91.71-1.91 1.62v2.71c0 .96.68 1.61 2.09 1.61 1.32 0 2.32-.52 2.32-1.59.22.33.35.65.35.91Zm7.22-3.81c0-.84-.36-1.45-1.83-1.45-1.41 0-2.23.61-2.23 1.52-.22-.29-.3-.61-.3-.87 0-.86 1.01-1.44 2.54-1.44 1.8 0 2.62.87 2.62 2.28v5.13c-.26-.1-.64-.14-.88-.14-.45 0-1.17.25-1.78.25-1.81 0-2.74-.86-2.74-2.06-.01-2.71 4.11-1.74 4.6-3.22Zm-1.75 4.54c1.07 0 1.75-.38 1.75-.38v-3.22c-.29 1.01-3.78.39-3.78 2.29 0 .76.59 1.31 2.03 1.31Zm5.76-10.21c.06 0 .8.01.8.64v7.8c0 1.12.25 2.16.94 2.16 0 0-.19.28-.57.28-.81 0-1.17-.88-1.17-2.06v-8.82Zm15.67 3.52c0 1.74-1.3 2.52-3.1 2.45 2.12.67 3.04 3.96 3.65 4.91-.67.09-.94.01-1.35-.77-1.23-2.41-1.87-3.94-4.41-4.13v4.93s-.84-.01-.84-.64v-9.57h2.81c1.87 0 3.23.62 3.23 2.38v.44h.01Zm-5.2-2.03v3.78h2.09c1.68 0 2.28-.71 2.28-1.97 0-1.28-.78-1.81-2.39-1.81h-1.98Zm13.45 8.01c0 1-1.44 1.45-2.73 1.45-1.67 0-2.74-.83-2.74-2.25v-3.01c0-1.41.94-2.25 2.67-2.25s2.73.84 2.73 2.1c0 1.15-.78 2.03-2.8 2.03-.94 0-1.8-.38-1.8-.38v1.29c0 1.09.46 1.68 1.94 1.68 1.32 0 2.39-.52 2.39-1.59.25.35.34.65.34.93Zm-4.67-3.05c-.06.03 1 .33 1.73.33 1.54 0 2.07-.48 2.07-1.25 0-.8-.48-1.35-1.9-1.35-1.54 0-1.9.64-1.9 1.71v.56Zm13.16 3.03c0 1.01-1.38 1.46-2.68 1.46-1.74 0-2.88-.83-2.88-2.25v-3.01c0-1.41 1.01-2.25 2.74-2.25 1.51 0 2.51.57 2.51 1.44 0 .28-.1.58-.32.87 0-.91-.81-1.52-2.22-1.52-1.48 0-1.91.71-1.91 1.62v2.71c0 .96.68 1.61 2.09 1.61 1.32 0 2.32-.52 2.32-1.59.22.33.35.65.35.91Zm8.67-.78c0 1.42-.94 2.25-2.94 2.25-2.01 0-2.96-.83-2.96-2.25v-3.01c0-1.41.94-2.25 2.96-2.25 2 0 2.94.84 2.94 2.25v3.01Zm-.8-2.8c0-1.07-.36-1.71-2.15-1.71-1.8 0-2.16.64-2.16 1.71v2.58c0 1.09.36 1.72 2.16 1.72 1.78 0 2.15-.64 2.15-1.72v-2.58Zm6.45-1.61c-.62 0-1.29.12-1.64.3v6.28s-.8 0-.8-.64v-6.68c.29.14.46.2.7.2.59 0 1.3-.32 2.06-.32 1.19 0 1.64.67 1.12 1.75-.03-.7-.7-.89-1.44-.89Zm8.49-4.25c.13 0 .8-.01.8.77v10.03c-.26-.1-.52-.14-.77-.14-.59 0-1.32.25-2.04.25-1.67 0-2.64-.87-2.64-2.2v-3.1c0-1.38 1.09-2.19 2.36-2.19 2.03 0 2.45.9 2.45.9s-.16-.28-.16-1.52v-2.8Zm0 5.67c0-.9-1.06-1.51-2.1-1.51-1 0-1.75.51-1.75 1.65v2.67c0 1.12.51 1.67 2.1 1.67 1.07 0 1.75-.35 1.75-.35v-4.13Zm3.73-.07c0-1.45.91-2.2 2.67-2.2 1.29 0 2.54.36 2.54 1.39 0 .3-.12.65-.35 1.07.01-.07.01-.16.01-.23 0-.87-.61-1.48-2.2-1.48-1.42 0-1.87.51-1.87 1.38 0 2.1 4.67-.12 4.67 3.25 0 1.25-.94 2.13-2.8 2.13-1.26 0-2.64-.3-2.64-1.46 0-.26.07-.55.22-.9 0 .91.71 1.61 2.42 1.61 1.58 0 2-.68 2-1.45 0-2.31-4.6-.15-4.67-3.11Zm17.1-5.12c1.52 0 3.3.33 3.3 1.67 0 .28-.09.64-.26 1.04 0-1.51-1.57-1.9-3.15-1.9-1.54 0-2.78.42-2.78 1.94 0 2.94 6.51.51 6.51 4.68 0 2.03-1.52 2.99-3.68 2.99-1.52 0-3.48-.45-3.48-1.7 0-.29.07-.65.23-1.06 0 1.46 1.67 1.94 3.33 1.94 1.83 0 2.72-.83 2.72-2.13 0-3.26-6.51-.91-6.51-4.65.01-2.17 1.8-2.82 3.77-2.82Zm11.01 6.16.26-2.45c.06-.59.55-.65.84-.7l-.28 2.8c-.19 1.97-1.26 3.15-2.07 3.77l-.57.44c-1.04.81-1.77 1.33-1.77 2.46 0 .36.12.78.33 1.29-.06.01-.15.03-.22.03-.39 0-.94-.23-.94-1.38 0-1.26 1-2.17 2.06-2.88-.7-.44-1.91-1.7-2.12-3.73l-.29-2.81s.77 0 .84.64l.29 2.52c.2 1.8 1.81 2.94 1.81 2.94s1.65-1.21 1.83-2.94Zm3.45-1.04c0-1.45.91-2.2 2.67-2.2 1.29 0 2.54.36 2.54 1.39 0 .3-.12.65-.35 1.07.01-.07.01-.16.01-.23 0-.87-.61-1.48-2.2-1.48-1.42 0-1.87.51-1.87 1.38 0 2.1 4.67-.12 4.67 3.25 0 1.25-.94 2.13-2.8 2.13-1.26 0-2.64-.3-2.64-1.46 0-.26.07-.55.22-.9 0 .91.71 1.61 2.42 1.61 1.58 0 2-.68 2-1.45 0-2.31-4.6-.15-4.67-3.11Zm8.39-3.93s.8.01.8.64v1.43h3.03s-.01.78-.54.78h-2.49v3.84c0 1.09.59 1.75 1.75 1.75.94 0 1.75-.59 1.75-1.48.19.35.26.61.26.87 0 .94-.99 1.39-2.03 1.39-1.39 0-2.54-.75-2.54-2.17v-7.05h.01Zm12.31 7.79c0 1-1.44 1.45-2.73 1.45-1.67 0-2.74-.83-2.74-2.25v-3.01c0-1.41.94-2.25 2.67-2.25s2.73.84 2.73 2.1c0 1.15-.78 2.03-2.8 2.03-.94 0-1.8-.38-1.8-.38v1.29c0 1.09.46 1.68 1.94 1.68 1.32 0 2.39-.52 2.39-1.59.25.35.34.65.34.93Zm-4.67-3.05c-.06.03 1 .33 1.73.33 1.54 0 2.07-.48 2.07-1.25 0-.8-.48-1.35-1.9-1.35-1.54 0-1.9.64-1.9 1.71v.56Zm12.39-.71c0-1.1-.62-1.52-1.93-1.52-1.22 0-1.93.35-1.93.35v6.31s-.8 0-.8-.62v-6.7s.36.2.65.2c.75 0 1.44-.32 2.28-.32 1.7 0 2.16.87 2.16.87.41-.38 1.2-.86 2.52-.86 1.17 0 2.49.58 2.49 2.09v5.33s-.8-.01-.8-.62v-4.55c0-1.03-.61-1.46-1.94-1.46-.91 0-1.91.46-1.91 1.26v5.38s-.8 0-.8-.62v-4.52h.01Z" fill="#FAFCFC"/><path d="M276.95 30.661c.3-.52.49-1.1.7-1.71.21-.63.43-1.28.78-1.89a5.25 5.25 0 0 1 1.93-1.9v-4.96c0-.63.12-3.99 0-6.2-1.85-.08-6.36 3.4-6.81 6.2v5.91h-5.91c-.63 0-1.14.51-1.14 1.14v4.54c0 .63.51 1.14 1.14 1.14h5.87c1.41-.17 2.74-1.03 3.44-2.27Z" fill="#FFF"/><path d="M286.28 26.811h-5.9c-.5.36-.93.82-1.24 1.36-.31.53-.51 1.12-.72 1.74-.21.62-.42 1.26-.76 1.85-.84 1.47-2.42 2.49-4.1 2.67v12.31c2.37-.49 6.93-2.44 6.81-7.21v-5.91h5.91c.63 0 1.14-.51 1.14-1.14v-4.54c-.01-.63-.52-1.13-1.14-1.13Z" fill="#FDFFFF"/><path d="M66.09 61.081c-1.51-1.46-2.36-4.37-2.36-6.45v-2.64c0-6.67 5.55-9.14 11.22-9.14 3.08 0 6 1.18 8.75 1.18 1.29 0 2.8-.34 4.77-1.12v11.72c0 6.22-4.32 9.93-12.34 9.93-4.21 0-7.07-1.57-7.07-1.57-.17.56-.34 1.46-.34 2.19 0 2.52 2.58 2.92 6.45 2.92h1.85c5.94 0 12.45-.06 12.45 7.96 0 5.94-4.21 9.93-13.35 9.93-7.63 0-12.28-2.41-12.28-6.11 0-1.46.56-2.97 1.91-4.71.5 4.43 5.16 5.5 9.87 5.5 4.99 0 6.73-1.63 6.73-4.21 0-2.63-2.24-2.92-5.5-2.92H74.1c-5.89 0-11.05-.73-11.05-6.39.01-2.25 1.25-3.94 3.04-6.07Zm10.04-1.85c4.15 0 5.1-1.96 5.1-5.44v-4.77s-2.52-.95-4.99-.95c-3.81 0-5.27 1.35-5.27 4.77v.95c0 3.48.95 5.44 5.16 5.44Z" fill="#FFF"/></g></g></svg>
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataTable,
|
|
3
|
-
DataTableSkeleton,
|
|
4
|
-
DefinitionTooltip,
|
|
5
|
-
Pagination,
|
|
6
|
-
Table,
|
|
7
|
-
TableBody,
|
|
8
|
-
TableCell,
|
|
9
|
-
TableContainer,
|
|
10
|
-
TableHead,
|
|
11
|
-
TableHeader,
|
|
12
|
-
TableRow,
|
|
13
|
-
Tag,
|
|
14
|
-
Layer,
|
|
15
|
-
TableToolbar,
|
|
16
|
-
TableToolbarContent,
|
|
17
|
-
TableToolbarSearch,
|
|
18
|
-
TableExpandedRow,
|
|
19
|
-
TableExpandHeader,
|
|
20
|
-
TableExpandRow,
|
|
21
|
-
} from "@carbon/react";
|
|
22
|
-
|
|
23
|
-
import {
|
|
24
|
-
isDesktop,
|
|
25
|
-
useConfig,
|
|
26
|
-
useLayoutType,
|
|
27
|
-
usePagination,
|
|
28
|
-
useSession,
|
|
29
|
-
} from "@openmrs/esm-framework";
|
|
30
|
-
import React, { useCallback, useMemo, useState } from "react";
|
|
31
|
-
import { useTranslation } from "react-i18next";
|
|
32
|
-
import {
|
|
33
|
-
formatWaitTime,
|
|
34
|
-
getOriginFromPathName,
|
|
35
|
-
getTagColor,
|
|
36
|
-
getTagType,
|
|
37
|
-
trimVisitNumber,
|
|
38
|
-
} from "../helpers/functions";
|
|
39
|
-
import styles from "./styles.scss";
|
|
40
|
-
import { usePatientQueuesList } from "./patient-queues.resource";
|
|
41
|
-
import { useActiveVisits } from "./active-visits.resource";
|
|
42
|
-
import EmptyState from "../../empty-state/empty-state.component";
|
|
43
|
-
import AssignBedWorkSpace from "../../workspace/allocate-bed-workspace.component";
|
|
44
|
-
import AdmissionActionButton from "./admission-action-button.component";
|
|
45
|
-
import { patientDetailsProps } from "../types";
|
|
46
|
-
import ViewActionsMenu from "./view-action-menu.component";
|
|
47
|
-
|
|
48
|
-
interface ActiveVisitsTableProps {
|
|
49
|
-
status: string;
|
|
50
|
-
setPatientCount?: (value: number) => void;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const ActivePatientsTable: React.FC<ActiveVisitsTableProps> = ({
|
|
54
|
-
status,
|
|
55
|
-
setPatientCount,
|
|
56
|
-
}) => {
|
|
57
|
-
const { t } = useTranslation();
|
|
58
|
-
const session = useSession();
|
|
59
|
-
const currentPathName: string = window.location.pathname;
|
|
60
|
-
const fromPage: string = getOriginFromPathName(currentPathName);
|
|
61
|
-
const pageSizes = [10, 20, 30, 40, 50];
|
|
62
|
-
const [currentPageSize, setPageSize] = useState(10);
|
|
63
|
-
const [showOverlay, setShowOverlay] = useState(false);
|
|
64
|
-
const [selectedPatientDetails, setSelectedPatientDetails] =
|
|
65
|
-
useState<patientDetailsProps>();
|
|
66
|
-
|
|
67
|
-
const layout = useLayoutType();
|
|
68
|
-
|
|
69
|
-
const { patientQueueEntries, isLoading } = useActiveVisits();
|
|
70
|
-
const { restrictWardAdministrationToLoginLocation } = useConfig();
|
|
71
|
-
|
|
72
|
-
const handleBedAssigmentModal = useCallback(
|
|
73
|
-
(entry) => {
|
|
74
|
-
setSelectedPatientDetails({
|
|
75
|
-
name: entry.name,
|
|
76
|
-
patientUuid: entry.patientUuid,
|
|
77
|
-
encounter: entry.encounter,
|
|
78
|
-
locationUuid: session?.sessionLocation?.uuid,
|
|
79
|
-
locationTo: entry.locationTo,
|
|
80
|
-
locationFrom: entry.locationFrom,
|
|
81
|
-
queueUuid: entry.uuid,
|
|
82
|
-
});
|
|
83
|
-
setShowOverlay(true);
|
|
84
|
-
},
|
|
85
|
-
[session?.sessionLocation?.uuid]
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const renderActionButton = useCallback(
|
|
89
|
-
(entry) => {
|
|
90
|
-
const buttonTexts = {
|
|
91
|
-
pending: "Assign Bed",
|
|
92
|
-
completed: "Transfer",
|
|
93
|
-
};
|
|
94
|
-
const buttonText = buttonTexts[status] || "Un-assign";
|
|
95
|
-
|
|
96
|
-
return (
|
|
97
|
-
<AdmissionActionButton
|
|
98
|
-
entry={entry}
|
|
99
|
-
handleBedAssigmentModal={handleBedAssigmentModal}
|
|
100
|
-
buttonText={buttonText}
|
|
101
|
-
/>
|
|
102
|
-
);
|
|
103
|
-
},
|
|
104
|
-
[handleBedAssigmentModal, status]
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
const {
|
|
108
|
-
goTo,
|
|
109
|
-
results: paginatedQueueEntries,
|
|
110
|
-
currentPage,
|
|
111
|
-
} = usePagination(patientQueueEntries, currentPageSize);
|
|
112
|
-
|
|
113
|
-
const tableHeaders = useMemo(
|
|
114
|
-
() => [
|
|
115
|
-
{
|
|
116
|
-
id: 0,
|
|
117
|
-
header: t("name", "Name"),
|
|
118
|
-
key: "name",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: 1,
|
|
122
|
-
header: t("idNumber", "ID Number"),
|
|
123
|
-
key: "idNumber",
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: 2,
|
|
127
|
-
header: t("gender", "Gender"),
|
|
128
|
-
key: "gender",
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
id: 3,
|
|
132
|
-
header: t("age", "Age"),
|
|
133
|
-
key: "age",
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: 4,
|
|
137
|
-
header: t("visitType", "Visit type"),
|
|
138
|
-
key: "visitType",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
id: 5,
|
|
142
|
-
header: t("visitStartTime", "Visit start date/time"),
|
|
143
|
-
key: "visitStartTime",
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 6,
|
|
147
|
-
header: t("action", "Action"),
|
|
148
|
-
key: "actions",
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
[t]
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
const tableRows = useMemo(() => {
|
|
155
|
-
return paginatedQueueEntries?.map((entry) => ({
|
|
156
|
-
...entry,
|
|
157
|
-
actions: {
|
|
158
|
-
content: (
|
|
159
|
-
<div className={styles.displayFlex}>{renderActionButton(entry)}</div>
|
|
160
|
-
),
|
|
161
|
-
},
|
|
162
|
-
}));
|
|
163
|
-
}, [paginatedQueueEntries, status, t, renderActionButton, fromPage]);
|
|
164
|
-
|
|
165
|
-
if (isLoading) {
|
|
166
|
-
return <DataTableSkeleton role="progressbar" />;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (
|
|
170
|
-
(!isLoading && patientQueueEntries && status === "pending") ||
|
|
171
|
-
status === "completed" ||
|
|
172
|
-
status === ""
|
|
173
|
-
) {
|
|
174
|
-
setPatientCount(patientQueueEntries.length);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (patientQueueEntries?.length) {
|
|
178
|
-
return (
|
|
179
|
-
<div className={styles.container}>
|
|
180
|
-
<div className={styles.headerBtnContainer}></div>
|
|
181
|
-
|
|
182
|
-
<DataTable
|
|
183
|
-
data-floating-menu-container
|
|
184
|
-
headers={tableHeaders}
|
|
185
|
-
overflowMenuOnHover={isDesktop(layout) ? true : false}
|
|
186
|
-
rows={tableRows}
|
|
187
|
-
isSortable
|
|
188
|
-
size="xs"
|
|
189
|
-
useZebraStyles
|
|
190
|
-
>
|
|
191
|
-
{({ rows, headers, getTableProps, getRowProps, onInputChange }) => (
|
|
192
|
-
<TableContainer className={styles.tableContainer}>
|
|
193
|
-
<TableToolbar
|
|
194
|
-
style={{
|
|
195
|
-
position: "static",
|
|
196
|
-
height: "3rem",
|
|
197
|
-
overflow: "visible",
|
|
198
|
-
backgroundColor: "color",
|
|
199
|
-
}}
|
|
200
|
-
>
|
|
201
|
-
<TableToolbarContent className={styles.toolbarContent}>
|
|
202
|
-
<Layer>
|
|
203
|
-
<TableToolbarSearch
|
|
204
|
-
className={styles.search}
|
|
205
|
-
onChange={onInputChange}
|
|
206
|
-
placeholder={t("searchThisList", "Search this list")}
|
|
207
|
-
size="sm"
|
|
208
|
-
/>
|
|
209
|
-
</Layer>
|
|
210
|
-
</TableToolbarContent>
|
|
211
|
-
</TableToolbar>
|
|
212
|
-
<Table {...getTableProps()} className={styles.activeVisitsTable}>
|
|
213
|
-
<TableHead>
|
|
214
|
-
<TableRow>
|
|
215
|
-
<TableExpandHeader />
|
|
216
|
-
{headers.map((header) => (
|
|
217
|
-
<TableHeader>
|
|
218
|
-
{header.header?.content ?? header.header}
|
|
219
|
-
</TableHeader>
|
|
220
|
-
))}
|
|
221
|
-
</TableRow>
|
|
222
|
-
</TableHead>
|
|
223
|
-
<TableBody>
|
|
224
|
-
{rows.map((row, index) => {
|
|
225
|
-
return (
|
|
226
|
-
<>
|
|
227
|
-
<TableExpandRow {...getRowProps({ row })} key={row.id}>
|
|
228
|
-
{row.cells.map((cell) => (
|
|
229
|
-
<TableCell key={cell.id}>
|
|
230
|
-
{cell.value?.content ?? cell.value}
|
|
231
|
-
</TableCell>
|
|
232
|
-
))}
|
|
233
|
-
</TableExpandRow>
|
|
234
|
-
|
|
235
|
-
{row.isExpanded ? (
|
|
236
|
-
<TableExpandedRow
|
|
237
|
-
className={styles.expandedLabQueueVisitRow}
|
|
238
|
-
colSpan={headers.length + 2}
|
|
239
|
-
>
|
|
240
|
-
<>
|
|
241
|
-
{/* <span>{tableRows[index]?.comment ?? ""}</span> */}
|
|
242
|
-
</>
|
|
243
|
-
</TableExpandedRow>
|
|
244
|
-
) : (
|
|
245
|
-
<TableExpandedRow
|
|
246
|
-
className={styles.hiddenRow}
|
|
247
|
-
colSpan={headers.length + 2}
|
|
248
|
-
/>
|
|
249
|
-
)}
|
|
250
|
-
</>
|
|
251
|
-
);
|
|
252
|
-
})}
|
|
253
|
-
</TableBody>
|
|
254
|
-
</Table>
|
|
255
|
-
<Pagination
|
|
256
|
-
forwardText="Next page"
|
|
257
|
-
backwardText="Previous page"
|
|
258
|
-
page={currentPage}
|
|
259
|
-
pageSize={currentPageSize}
|
|
260
|
-
pageSizes={pageSizes}
|
|
261
|
-
totalItems={patientQueueEntries?.length}
|
|
262
|
-
className={styles.pagination}
|
|
263
|
-
onChange={({ pageSize, page }) => {
|
|
264
|
-
if (pageSize !== currentPageSize) {
|
|
265
|
-
setPageSize(pageSize);
|
|
266
|
-
}
|
|
267
|
-
if (page !== currentPage) {
|
|
268
|
-
goTo(page);
|
|
269
|
-
}
|
|
270
|
-
}}
|
|
271
|
-
/>
|
|
272
|
-
</TableContainer>
|
|
273
|
-
)}
|
|
274
|
-
</DataTable>
|
|
275
|
-
{showOverlay && (
|
|
276
|
-
<AssignBedWorkSpace
|
|
277
|
-
patientDetails={selectedPatientDetails}
|
|
278
|
-
closePanel={() => setShowOverlay(false)}
|
|
279
|
-
queueStatus={status}
|
|
280
|
-
headerTitle={t(
|
|
281
|
-
"assignBedToPatient",
|
|
282
|
-
restrictWardAdministrationToLoginLocation === true
|
|
283
|
-
? `Assign Bed to Patient ${selectedPatientDetails.name} in the ${session?.sessionLocation?.display} Ward`
|
|
284
|
-
: `Assign Bed to Patient ${selectedPatientDetails.name}`
|
|
285
|
-
)}
|
|
286
|
-
/>
|
|
287
|
-
)}
|
|
288
|
-
</div>
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return (
|
|
293
|
-
<EmptyState
|
|
294
|
-
msg={t("noQueueItems", "No queue items to display")}
|
|
295
|
-
helper=""
|
|
296
|
-
/>
|
|
297
|
-
);
|
|
298
|
-
};
|
|
299
|
-
export default ActivePatientsTable;
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import useSWRInfinite from "swr/infinite";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
|
-
import isToday from "dayjs/plugin/isToday";
|
|
5
|
-
import last from "lodash-es/last";
|
|
6
|
-
import {
|
|
7
|
-
openmrsFetch,
|
|
8
|
-
type Visit,
|
|
9
|
-
useSession,
|
|
10
|
-
type FetchResponse,
|
|
11
|
-
formatDatetime,
|
|
12
|
-
parseDate,
|
|
13
|
-
useConfig,
|
|
14
|
-
} from "@openmrs/esm-framework";
|
|
15
|
-
|
|
16
|
-
dayjs.extend(isToday);
|
|
17
|
-
|
|
18
|
-
export interface ActiveVisit {
|
|
19
|
-
age: string;
|
|
20
|
-
id: string;
|
|
21
|
-
idNumber: string;
|
|
22
|
-
gender: string;
|
|
23
|
-
location: string;
|
|
24
|
-
name: string;
|
|
25
|
-
patientUuid: string;
|
|
26
|
-
visitStartTime: string;
|
|
27
|
-
visitType: string;
|
|
28
|
-
visitUuid: string;
|
|
29
|
-
[identifier: string]: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface VisitResponse {
|
|
33
|
-
results: Array<Visit>;
|
|
34
|
-
links: Array<{ rel: "prev" | "next" }>;
|
|
35
|
-
totalCount: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function useActiveVisits() {
|
|
39
|
-
const session = useSession();
|
|
40
|
-
const config = useConfig();
|
|
41
|
-
const { inpatientVisitUuid } = useConfig();
|
|
42
|
-
const sessionLocation = session?.sessionLocation?.uuid;
|
|
43
|
-
|
|
44
|
-
const customRepresentation =
|
|
45
|
-
"custom:(uuid,patient:(uuid,identifiers:(identifier,uuid,identifierType:(name,uuid)),person:(age,display,gender,uuid,attributes:(value,attributeType:(uuid,display))))," +
|
|
46
|
-
"visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,stopDatetime)";
|
|
47
|
-
|
|
48
|
-
const getUrl = (
|
|
49
|
-
pageIndex,
|
|
50
|
-
previousPageData: FetchResponse<VisitResponse>
|
|
51
|
-
) => {
|
|
52
|
-
if (
|
|
53
|
-
pageIndex &&
|
|
54
|
-
!previousPageData?.data?.links?.some((link) => link.rel === "next")
|
|
55
|
-
) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const url = `/ws/rest/v1/visit?v=${customRepresentation}&`;
|
|
60
|
-
const urlSearchParams = new URLSearchParams();
|
|
61
|
-
|
|
62
|
-
urlSearchParams.append("includeInactive", "false");
|
|
63
|
-
urlSearchParams.append("visitType", `${inpatientVisitUuid}`);
|
|
64
|
-
urlSearchParams.append("totalCount", "true");
|
|
65
|
-
//urlSearchParams.append("location", `${sessionLocation}`);
|
|
66
|
-
|
|
67
|
-
if (pageIndex) {
|
|
68
|
-
urlSearchParams.append("startIndex", `${pageIndex * 50}`);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return url + urlSearchParams.toString();
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const {
|
|
75
|
-
data,
|
|
76
|
-
error,
|
|
77
|
-
isLoading,
|
|
78
|
-
isValidating,
|
|
79
|
-
size: pageNumber,
|
|
80
|
-
setSize,
|
|
81
|
-
mutate,
|
|
82
|
-
} = useSWRInfinite<FetchResponse<VisitResponse>, Error>(
|
|
83
|
-
sessionLocation ? getUrl : null,
|
|
84
|
-
openmrsFetch
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
if (
|
|
89
|
-
data &&
|
|
90
|
-
data?.[pageNumber - 1]?.data?.links?.some((link) => link.rel === "next")
|
|
91
|
-
) {
|
|
92
|
-
setSize((currentSize) => currentSize + 1);
|
|
93
|
-
}
|
|
94
|
-
}, [data, pageNumber]);
|
|
95
|
-
|
|
96
|
-
const mapVisitProperties = (visit: Visit): ActiveVisit => {
|
|
97
|
-
// create base object
|
|
98
|
-
const activeVisits: ActiveVisit = {
|
|
99
|
-
age: visit?.patient?.person?.age,
|
|
100
|
-
id: visit.uuid,
|
|
101
|
-
idNumber: null,
|
|
102
|
-
gender: visit?.patient?.person?.gender,
|
|
103
|
-
location: visit?.location?.uuid,
|
|
104
|
-
name: visit?.patient?.person?.display,
|
|
105
|
-
patientUuid: visit?.patient?.uuid,
|
|
106
|
-
visitStartTime: formatDatetime(parseDate(visit?.startDatetime)),
|
|
107
|
-
visitType: visit?.visitType?.display,
|
|
108
|
-
visitUuid: visit.uuid,
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// in case no configuration is given the previous behavior remains the same
|
|
112
|
-
if (!config?.activeVisits?.identifiers) {
|
|
113
|
-
activeVisits.idNumber =
|
|
114
|
-
visit?.patient?.identifiers[0]?.identifier ?? "--";
|
|
115
|
-
} else {
|
|
116
|
-
// map identifiers on config
|
|
117
|
-
config?.activeVisits?.identifiers?.map((configIdentifier) => {
|
|
118
|
-
// check if in the current visit the patient has in his identifiers the current identifierType name
|
|
119
|
-
const visitIdentifier = visit?.patient?.identifiers.find(
|
|
120
|
-
(visitIdentifier) =>
|
|
121
|
-
visitIdentifier?.identifierType?.name ===
|
|
122
|
-
configIdentifier?.identifierName
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
// add the new identifier or rewrite existing one to activeVisit object
|
|
126
|
-
// the parameter will corresponds to the name of the key value of the configuration
|
|
127
|
-
// and the respective value is the visit identifier
|
|
128
|
-
// If there isn't a identifier we display this default text '--'
|
|
129
|
-
activeVisits[configIdentifier.header?.key] =
|
|
130
|
-
visitIdentifier?.identifier ?? "--";
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// map attributes on config
|
|
135
|
-
config?.activeVisits?.attributes?.map(({ display, header }) => {
|
|
136
|
-
// check if in the current visit the person has in his attributes the current display
|
|
137
|
-
const personAttributes = visit?.patient?.person?.attributes.find(
|
|
138
|
-
(personAttributes) =>
|
|
139
|
-
personAttributes?.attributeType?.display === display
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
// add the new attribute or rewrite existing one to activeVisit object
|
|
143
|
-
// the parameter will correspond to the name of the key value of the configuration
|
|
144
|
-
// and the respective value is the persons value
|
|
145
|
-
// If there isn't a attribute we display this default text '--'
|
|
146
|
-
activeVisits[header?.key] = personAttributes?.value ?? "--";
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
return activeVisits;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
const formattedActiveVisits: Array<ActiveVisit> = data
|
|
153
|
-
? [].concat(
|
|
154
|
-
...data?.map((res) => res?.data?.results?.map(mapVisitProperties))
|
|
155
|
-
)
|
|
156
|
-
: [];
|
|
157
|
-
|
|
158
|
-
return {
|
|
159
|
-
patientQueueEntries: formattedActiveVisits,
|
|
160
|
-
isError: error,
|
|
161
|
-
isLoading,
|
|
162
|
-
isValidating,
|
|
163
|
-
patientQueueCount: data?.[0]?.data?.totalCount ?? 0,
|
|
164
|
-
mutate,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export const getOriginFromPathName = (pathname = "") => {
|
|
169
|
-
const from = pathname.split("/");
|
|
170
|
-
return last(from);
|
|
171
|
-
};
|
|
File without changes
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button, Tooltip } from "@carbon/react";
|
|
3
|
-
import { HospitalBed } from "@carbon/react/icons";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import styles from "./admission-action-button-styles.scss";
|
|
6
|
-
|
|
7
|
-
const AdmissionActionButton = ({
|
|
8
|
-
entry,
|
|
9
|
-
handleBedAssigmentModal,
|
|
10
|
-
buttonText,
|
|
11
|
-
}) => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
return (
|
|
14
|
-
<Tooltip align="bottom" label={t("buttonTooltip", buttonText)}>
|
|
15
|
-
<Button
|
|
16
|
-
className={styles.actionButton}
|
|
17
|
-
kind="ghost"
|
|
18
|
-
renderIcon={HospitalBed}
|
|
19
|
-
onClick={() => handleBedAssigmentModal(entry)}
|
|
20
|
-
iconDescription={t("buttonText", buttonText)}
|
|
21
|
-
></Button>
|
|
22
|
-
</Tooltip>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default AdmissionActionButton;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Header from "../../header/header.component";
|
|
3
|
-
import styles from "./styles.scss";
|
|
4
|
-
import BedAdmissionTabs from "../bed-admission-tabs.component";
|
|
5
|
-
|
|
6
|
-
const ActivePatientsHome: React.FC = () => {
|
|
7
|
-
return (
|
|
8
|
-
<section className={styles.section}>
|
|
9
|
-
<Header route="In Patient" headerTitle="" />
|
|
10
|
-
<BedAdmissionTabs />
|
|
11
|
-
</section>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default ActivePatientsHome;
|