@kenyaemr/esm-ward-app 8.5.1-pre.61 → 8.5.1-pre.65
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 +3 -3
- package/dist/8130.js +1 -1
- package/dist/8130.js.map +1 -1
- package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +6 -6
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/config-schema.ts +8 -2
- package/src/in-patient/inpatient-detail-view.component.tsx +18 -1
- package/src/in-patient/inpatient-forms.component.tsx +2 -1
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0","emrapi":"^2.0.0 || 2.0.0-SNAPSHOT"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"wardPatientNotesActionButtonExtension","name":"ward-inpatient-notes-form-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"name":"transfer-swap-patient-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"patient-discharge-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientDischargeWorkspaceSideRailIcon"},{"name":"clinical-forms-workspace-siderail-button","component":"clinicalFormWorkspaceSideRailIcon","slot":"action-menu-ward-patient-items-slot"},{"name":"admission-requests-workspace-siderail-button","component":"admissionRequestsWorkspaceSideRailIcon","slot":"action-menu-ward-patient-admission-requests-items-slot"},{"name":"create-admission-request-workspace-siderail-button","component":"createAdmissionEncounterWorkspaceSideRailIcon","slot":"action-menu-ward-patient-admission-requests-items-slot"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"patientDischargeDocumentPreview","name":"patient-discharge-document-preview-modal"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"},{"name":"in-patient-dashboard-link","component":"inPatientChartLink","order":7,"meta":{"slot":"patient-chart-in-patient-dashboard-slot","path":"in-patient","layoutMode":"anchored","columns":1,"columnSpan":1}},{"name":"in-patient-dashboard","slot":"patient-chart-in-patient-dashboard-slot","component":"inPatientChartDashboard","meta":{"fullWidth":false}}],"workspaces":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","title":"admissionRequests","type":"pending-admission-requests","width":"wider"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","title":"admitPatient","type":"patient-search-workspace","width":"wider"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","type":"ward-patient-notes","title":"inpatientNotesWorkspaceTitle"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","title":"admissionRequests","type":"admission-requests"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","type":"ward","title":"Ward patient","width":"extra-wide"},{"name":"patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","title":"transfers","type":"transfer-swap-bed-form"},{"name":"patient-transfer-request-workspace","component":"patientTransferRequestWorkspace","title":"transferRequest","type":"transfer-request-form"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","title":"discharge","width":"extra-wide","canMaximize":true,"type":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"patientClinicalFormsWorkspace","title":"clinicalForms","type":"ward-patient-clinical-forms","width":"wider"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","title":"cancelAdmissionRequest","type":"cancel-admission-request"}],"workspaceGroups":[{"name":"ward-patient","members":["ward-patient-workspace","ward-patient-notes-workspace","patient-transfer-swap-workspace","patient-discharge-workspace","ward-patient-clinical-forms-workspace","add-drug-order","order-basket","add-lab-order"]},{"name":"ward-patient-admission-requests","members":["admission-requests-workspace","create-admission-encounter-workspace"]}],"version":"8.5.1-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0","emrapi":"^2.0.0 || 2.0.0-SNAPSHOT"},"optionalBackendDependencies":{"bedmanagement":{"version":"^6.0.0 || 6.0.0-SNAPSHOT","feature":{"flagName":"bedmanagement-module","label":"Ward App Patient Service","description":"This module, if installed, provides services for managing patients admitted to the ward."}}},"extensions":[{"name":"ward-dashboard-link","component":"wardDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"ward","slot":"ward-dashboard-slot","title":"Wards"}},{"component":"root","name":"ward-dashboard","slot":"ward-dashboard-slot"},{"component":"wardView","name":"ward-view","slot":"ward-view-slot"},{"component":"wardPatientActionButtonExtension","name":"ward-patient-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"wardPatientNotesActionButtonExtension","name":"ward-inpatient-notes-form-action-button","slot":"action-menu-ward-patient-items-slot"},{"component":"coloredObsTagCardRowExtension","name":"colored-obs-tags-card-row","slot":"ward-patient-card-slot"},{"name":"transfer-swap-patient-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientTransferAndSwapWorkspaceSiderailIcon"},{"name":"patient-discharge-siderail-button","slot":"action-menu-ward-patient-items-slot","component":"patientDischargeWorkspaceSideRailIcon"},{"name":"clinical-forms-workspace-siderail-button","component":"clinicalFormWorkspaceSideRailIcon","slot":"action-menu-ward-patient-items-slot"},{"name":"admission-requests-workspace-siderail-button","component":"admissionRequestsWorkspaceSideRailIcon","slot":"action-menu-ward-patient-admission-requests-items-slot"},{"name":"create-admission-request-workspace-siderail-button","component":"createAdmissionEncounterWorkspaceSideRailIcon","slot":"action-menu-ward-patient-admission-requests-items-slot"},{"component":"defaultWardView","name":"default-ward","slot":"default-ward"},{"component":"maternalWardView","name":"maternal-ward","slot":"maternal-ward"},{"component":"patientDischargeDocumentPreview","name":"patient-discharge-document-preview-modal"},{"component":"wardPatientWorkspaceBanner","name":"ward-patient-workspace-banner","slot":"ward-workspace-patient-banner-slot"},{"name":"in-patient-dashboard-link","component":"inPatientChartLink","order":7,"meta":{"slot":"patient-chart-in-patient-dashboard-slot","path":"in-patient","layoutMode":"anchored","columns":1,"columnSpan":1}},{"name":"in-patient-dashboard","slot":"patient-chart-in-patient-dashboard-slot","component":"inPatientChartDashboard","meta":{"fullWidth":false}}],"workspaces":[{"name":"admission-requests-workspace","component":"admissionRequestWorkspace","title":"admissionRequests","type":"pending-admission-requests","width":"wider"},{"name":"create-admission-encounter-workspace","component":"createAdmissionEncounterWorkspace","title":"admitPatient","type":"patient-search-workspace","width":"wider"},{"name":"ward-patient-notes-workspace","component":"wardPatientNotesWorkspace","type":"ward-patient-notes","title":"inpatientNotesWorkspaceTitle"},{"name":"admit-patient-form-workspace","component":"admitPatientFormWorkspace","title":"admissionRequests","type":"admission-requests"},{"name":"ward-patient-workspace","component":"wardPatientWorkspace","type":"ward","title":"Ward patient","width":"extra-wide"},{"name":"patient-transfer-swap-workspace","component":"patientTransferAndSwapWorkspace","title":"transfers","type":"transfer-swap-bed-form"},{"name":"patient-transfer-request-workspace","component":"patientTransferRequestWorkspace","title":"transferRequest","type":"transfer-request-form"},{"name":"patient-discharge-workspace","component":"patientDischargeWorkspace","title":"discharge","width":"extra-wide","canMaximize":true,"type":"ward-patient-discharge"},{"name":"ward-patient-clinical-forms-workspace","component":"patientClinicalFormsWorkspace","title":"clinicalForms","type":"ward-patient-clinical-forms","width":"wider"},{"name":"cancel-admission-request-workspace","component":"cancelAdmissionRequestWorkspace","title":"cancelAdmissionRequest","type":"cancel-admission-request"}],"workspaceGroups":[{"name":"ward-patient","members":["ward-patient-workspace","ward-patient-notes-workspace","patient-transfer-swap-workspace","patient-discharge-workspace","ward-patient-clinical-forms-workspace","add-drug-order","order-basket","add-lab-order"]},{"name":"ward-patient-admission-requests","members":["admission-requests-workspace","create-admission-encounter-workspace"]}],"version":"8.5.1-pre.65"}
|
package/package.json
CHANGED
package/src/config-schema.ts
CHANGED
|
@@ -402,7 +402,7 @@ export const configSchema: ConfigSchema = {
|
|
|
402
402
|
label: 'Doctors Note',
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
|
-
uuid: '
|
|
405
|
+
uuid: '07dc609f-e607-43d6-9dc3-8bd405c4226a',
|
|
406
406
|
label: 'Post Delivery',
|
|
407
407
|
},
|
|
408
408
|
{
|
|
@@ -418,11 +418,16 @@ export const configSchema: ConfigSchema = {
|
|
|
418
418
|
label: 'Fluid Intake',
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
|
-
uuid: '
|
|
421
|
+
uuid: '3efe6966-a011-4d24-aa43-d3051bfbb8e3',
|
|
422
422
|
label: 'Initial Nursing Cardex',
|
|
423
423
|
},
|
|
424
424
|
],
|
|
425
425
|
},
|
|
426
|
+
inPatientVisitTypeUuid: {
|
|
427
|
+
_type: Type.String,
|
|
428
|
+
_description: 'The visit type uuid for in-patient',
|
|
429
|
+
_default: 'a73e2ac6-263b-47fc-99fc-e0f2c09fc914',
|
|
430
|
+
},
|
|
426
431
|
};
|
|
427
432
|
|
|
428
433
|
export interface WardConfigObject {
|
|
@@ -470,6 +475,7 @@ export interface WardConfigObject {
|
|
|
470
475
|
doctorsNoteEncounterType: string;
|
|
471
476
|
admissionRequestFormUuid: string;
|
|
472
477
|
inPatientForms: Array<{ label: string; uuid: string; hideExpression: string }>;
|
|
478
|
+
inPatientVisitTypeUuid: string;
|
|
473
479
|
}
|
|
474
480
|
|
|
475
481
|
export interface PendingItemsElementConfig {
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ErrorState,
|
|
4
4
|
formatDatetime,
|
|
5
5
|
parseDate,
|
|
6
|
+
useConfig,
|
|
6
7
|
useEmrConfiguration,
|
|
7
8
|
usePatient,
|
|
8
9
|
useVisit,
|
|
@@ -15,6 +16,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
16
|
import { useAdmissionLocation } from '../hooks/useAdmissionLocation';
|
|
16
17
|
import InpatientForms from './inpatient-forms.component';
|
|
17
18
|
import styles from './inpatient.scss';
|
|
19
|
+
import { type WardConfigObject } from '../config-schema';
|
|
18
20
|
|
|
19
21
|
type InpatientDetailViewProps = {
|
|
20
22
|
patientUuid: string;
|
|
@@ -23,7 +25,8 @@ type InpatientDetailViewProps = {
|
|
|
23
25
|
const InpatientDetailView: FC<InpatientDetailViewProps> = ({ patientUuid }) => {
|
|
24
26
|
const { isLoading: isLoadingPatient, patient, error } = usePatient(patientUuid);
|
|
25
27
|
const { isLoadingEmrConfiguration, emrConfiguration, errorFetchingEmrConfiguration } = useEmrConfiguration();
|
|
26
|
-
const { isLoading: isLoadingActiveVisit, error: currVisistError } = useVisit(patientUuid);
|
|
28
|
+
const { isLoading: isLoadingActiveVisit, error: currVisistError, currentVisit } = useVisit(patientUuid);
|
|
29
|
+
const { inPatientVisitTypeUuid } = useConfig<WardConfigObject>();
|
|
27
30
|
const { t } = useTranslation();
|
|
28
31
|
if (isLoadingActiveVisit || isLoadingEmrConfiguration || isLoadingPatient) {
|
|
29
32
|
return <DataTableSkeleton />;
|
|
@@ -38,6 +41,20 @@ const InpatientDetailView: FC<InpatientDetailViewProps> = ({ patientUuid }) => {
|
|
|
38
41
|
);
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
if (!currentVisit || currentVisit?.visitType?.uuid !== inPatientVisitTypeUuid) {
|
|
45
|
+
return (
|
|
46
|
+
<Layer>
|
|
47
|
+
<CardHeader title={t('inpatientdetails', 'Inpatient Details')}>
|
|
48
|
+
<></>
|
|
49
|
+
</CardHeader>
|
|
50
|
+
<Tile className={styles.patientNotAdmitted}>
|
|
51
|
+
<EmptyDataIllustration />
|
|
52
|
+
<p>{t('noActiveVisit', 'This Patient Not currently admitted to ward')}</p>
|
|
53
|
+
</Tile>
|
|
54
|
+
</Layer>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
41
58
|
return (
|
|
42
59
|
<div>
|
|
43
60
|
<PatientAdmitted patientUuid={patientUuid} patient={patient} emrConfiguration={emrConfiguration} />
|
|
@@ -48,11 +48,12 @@ const InpatientForms: FC<InpatientFormsProps> = ({ patientUuid, patient, emrConf
|
|
|
48
48
|
if (!currentVisit) {
|
|
49
49
|
return launchStartVisitPrompt();
|
|
50
50
|
}
|
|
51
|
+
const filledFormEncounter = currentVisit?.encounters?.find((en) => en?.form?.uuid === form.uuid);
|
|
51
52
|
launchWorkspace('patient-form-entry-workspace', {
|
|
52
53
|
workspaceTitle: form.label,
|
|
53
54
|
mutateForm: () => {},
|
|
54
55
|
formInfo: {
|
|
55
|
-
encounterUuid: '',
|
|
56
|
+
encounterUuid: filledFormEncounter?.uuid ?? '',
|
|
56
57
|
formUuid: form.uuid,
|
|
57
58
|
additionalProps: {},
|
|
58
59
|
},
|