@ampath/esm-dha-workflow-app 4.0.0-next.142 → 4.0.0-next.144
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/dist/3485.js +1 -1
- package/dist/3485.js.map +1 -1
- package/dist/8235.js +1 -1
- package/dist/8235.js.map +1 -1
- package/dist/esm-dha-workflow-app.js.buildmanifest.json +9 -9
- 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 +6 -0
- package/src/registry/modal/send-to-triage/send-to-triage.modal.tsx +15 -7
- package/src/resources/queue.resource.ts +3 -3
- package/src/routes.json +3 -1
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{},"pages":[{"component":"root","route":"dha-workflow","online":true,"offline":true}],"extensions":[{"component":"navLinks","name":"side-nav-workflow-links","slot":"dha-workflow-slot","online":true,"offline":true},{"name":"dha-workflow-dashboard-link","component":"dhaWorkflowDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"dashboard","slot":"dha-workflow-dashboard-slot","title":"Dashboard"},"online":true,"offline":true,"order":0},{"component":"dhaWorkflowDashboard","name":"dashboardExt","slot":"dha-workflow-dashboard-slot"},{"name":"registry-dashboard-link","component":"registryDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Client Registry Dashboard"],"meta":{"name":"registry","slot":"client-registry-dashboard-slot","title":"Registry"},"online":true,"offline":true,"order":1},{"component":"registryExtension","name":"registry","slot":"client-registry-dashboard-slot","privileges":["O3 View Client Registry Dashboard"]},{"name":"triage-dashboard-link","component":"triageDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Triage Dashboard"],"meta":{"name":"triage","slot":"triage-queue-dashboard-slot","title":"Triage"},"online":true,"offline":false},{"component":"triageQueueExtension","name":"triage","slot":"triage-queue-dashboard-slot","privileges":["O3 View Triage Dashboard"]},{"name":"consultation-dashboard-link","component":"consultationDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Consultation Dashboard"],"meta":{"name":"consultation","slot":"consultation-dashboard-slot","title":"Consultation"},"online":true,"offline":false},{"component":"consultationQueue","name":"consultation","slot":"consultation-dashboard-slot","privileges":["O3 View Consultation Dashboard"]},{"name":"mnch-dashboard-link","component":"mnchQueueDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View MNCH Dashboard"],"meta":{"name":"mnch","slot":"mnch-dashboard-slot","title":"MNCH"},"online":true,"offline":true},{"component":"mnchQueueDashboard","name":"mnch","slot":"mnch-dashboard-slot","privileges":["O3 View MNCH Dashboard"]},{"name":"pharmacy-dashboard-link","component":"pharmacyDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Pharmacy Dashboard"],"meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Pharmacy"},"online":true,"offline":true},{"name":"bookings-dashboard-link","component":"bookingsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Bookings Dashboard"],"meta":{"name":"bookings","slot":"bookings-dashboard-slot","title":"Bookings"},"online":true,"offline":true},{"component":"bookings","name":"bookings","slot":"bookings-dashboard-slot","privileges":["O3 View Bookings Dashboard"]},{"name":"service-queue-admin-dashboard-link","component":"serviceQueuesAdminLink","slot":"app-menu-slot","meta":{"name":"service-queue-admin","slot":"service-queue-admin-dashboard-slot","title":"Service Queue Admin"},"online":true,"offline":true},{"component":"serviceQueueAdmin","name":"service-queue-admin","slot":"service-queue-admin-dashboard-slot"},{"name":"admissions-dashboard-link","component":"admissionsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Admissions Dashboard"],"meta":{"name":"admissions-dashboard","slot":"admissions-dashboard-slot","title":"Admissions Dashboard"},"online":true,"offline":true},{"component":"admissionsDashboard","name":"admissions-dashboard","slot":"admissions-dashboard-slot","privileges":["O3 View Admissions Dashboard"]},{"component":"serviceQueueBannerComponent","name":"service-queue-banne","slot":"patient-banner-tags-slot"},{"name":"admissions-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"patientChartAdmissionsLink","meta":{"slot":"patient-chart-admissions-summary-dashboard-slot","path":"Admissions","layoutMode":"anchored"},"online":true,"offline":true},{"name":"admission-details","slot":"patient-chart-admissions-summary-dashboard-slot","component":"patientAdmissionSummary","order":1,"meta":{"title":"Admissions","view":"admissions"},"online":true,"offline":true},{"name":"ampath-billing-dashboard-link","component":"billingDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Accounting Dashboard"],"meta":{"name":"billing","slot":"ampath-billing-dashboard-slot","title":"Accounting"},"online":true,"offline":true},{"component":"billingRoot","name":"billing","slot":"ampath-billing-dashboard-slot","privileges":["O3 View Accounting Dashboard"]},{"name":"ampath-billing-checkin-form","slot":"extra-visit-attribute-slot","component":"visitBillingForm"}],"workspaces":[{"name":"create-order-bill-form-workspace","component":"createOrderBillFormWorkspace","title":"Create order Bill","type":"other-form"}],"modals":[{"name":"sign-off-queue-entry-modal","component":"signOffModal"}],"version":"4.0.0-next.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{},"pages":[{"component":"root","route":"dha-workflow","online":true,"offline":true}],"extensions":[{"component":"navLinks","name":"side-nav-workflow-links","slot":"dha-workflow-slot","online":true,"offline":true},{"name":"dha-workflow-dashboard-link","component":"dhaWorkflowDashboardLink","slot":"homepage-dashboard-slot","meta":{"name":"dashboard","slot":"dha-workflow-dashboard-slot","title":"Dashboard"},"online":true,"offline":true,"order":0},{"component":"dhaWorkflowDashboard","name":"dashboardExt","slot":"dha-workflow-dashboard-slot"},{"name":"registry-dashboard-link","component":"registryDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Client Registry Dashboard"],"meta":{"name":"registry","slot":"client-registry-dashboard-slot","title":"Registry"},"online":true,"offline":true,"order":1},{"component":"registryExtension","name":"registry","slot":"client-registry-dashboard-slot","privileges":["O3 View Client Registry Dashboard"]},{"name":"triage-dashboard-link","component":"triageDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Triage Dashboard"],"meta":{"name":"triage","slot":"triage-queue-dashboard-slot","title":"Triage"},"online":true,"offline":false},{"component":"triageQueueExtension","name":"triage","slot":"triage-queue-dashboard-slot","privileges":["O3 View Triage Dashboard"]},{"name":"consultation-dashboard-link","component":"consultationDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Consultation Dashboard"],"meta":{"name":"consultation","slot":"consultation-dashboard-slot","title":"Consultation"},"online":true,"offline":false},{"component":"consultationQueue","name":"consultation","slot":"consultation-dashboard-slot","privileges":["O3 View Consultation Dashboard"]},{"name":"mnch-dashboard-link","component":"mnchQueueDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View MNCH Dashboard"],"meta":{"name":"mnch","slot":"mnch-dashboard-slot","title":"MNCH"},"online":true,"offline":true},{"component":"mnchQueueDashboard","name":"mnch","slot":"mnch-dashboard-slot","privileges":["O3 View MNCH Dashboard"]},{"name":"pharmacy-dashboard-link","component":"pharmacyDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Pharmacy Dashboard"],"meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Pharmacy"},"online":true,"offline":true},{"name":"bookings-dashboard-link","component":"bookingsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Bookings Dashboard"],"meta":{"name":"bookings","slot":"bookings-dashboard-slot","title":"Bookings"},"online":true,"offline":true},{"component":"bookings","name":"bookings","slot":"bookings-dashboard-slot","privileges":["O3 View Bookings Dashboard"]},{"name":"service-queue-admin-dashboard-link","component":"serviceQueuesAdminLink","privileges":["O3 View Service Queue Admin Panel"],"slot":"app-menu-slot","meta":{"name":"service-queue-admin","slot":"service-queue-admin-dashboard-slot","title":"Service Queue Admin"},"online":true,"offline":true},{"component":"serviceQueueAdmin","name":"service-queue-admin","slot":"service-queue-admin-dashboard-slot","privileges":["O3 View Service Queue Admin Panel"]},{"name":"admissions-dashboard-link","component":"admissionsDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Admissions Dashboard"],"meta":{"name":"admissions-dashboard","slot":"admissions-dashboard-slot","title":"Admissions Dashboard"},"online":true,"offline":true},{"component":"admissionsDashboard","name":"admissions-dashboard","slot":"admissions-dashboard-slot","privileges":["O3 View Admissions Dashboard"]},{"component":"serviceQueueBannerComponent","name":"service-queue-banne","slot":"patient-banner-tags-slot"},{"name":"admissions-summary-dashboard","slot":"patient-chart-dashboard-slot","component":"patientChartAdmissionsLink","meta":{"slot":"patient-chart-admissions-summary-dashboard-slot","path":"Admissions","layoutMode":"anchored"},"online":true,"offline":true},{"name":"admission-details","slot":"patient-chart-admissions-summary-dashboard-slot","component":"patientAdmissionSummary","order":1,"meta":{"title":"Admissions","view":"admissions"},"online":true,"offline":true},{"name":"ampath-billing-dashboard-link","component":"billingDashboardLink","slot":"homepage-dashboard-slot","privileges":["O3 View Accounting Dashboard"],"meta":{"name":"billing","slot":"ampath-billing-dashboard-slot","title":"Accounting"},"online":true,"offline":true},{"component":"billingRoot","name":"billing","slot":"ampath-billing-dashboard-slot","privileges":["O3 View Accounting Dashboard"]},{"name":"ampath-billing-checkin-form","slot":"extra-visit-attribute-slot","component":"visitBillingForm"}],"workspaces":[{"name":"create-order-bill-form-workspace","component":"createOrderBillFormWorkspace","title":"Create order Bill","type":"other-form"}],"modals":[{"name":"sign-off-queue-entry-modal","component":"signOffModal"}],"version":"4.0.0-next.144"}
|
package/package.json
CHANGED
package/src/config-schema.ts
CHANGED
|
@@ -141,6 +141,11 @@ export const configSchema = {
|
|
|
141
141
|
_type: Type.Array,
|
|
142
142
|
_description: 'NON SHA payment modes',
|
|
143
143
|
_default: []
|
|
144
|
+
},
|
|
145
|
+
registrationServicequeues:{
|
|
146
|
+
_type: Type.Array,
|
|
147
|
+
_description: 'Service Queues to display at send to triage',
|
|
148
|
+
_default: []
|
|
144
149
|
}
|
|
145
150
|
};
|
|
146
151
|
|
|
@@ -197,6 +202,7 @@ export interface ConfigObject {
|
|
|
197
202
|
orderEncounterTypeUuid: string;
|
|
198
203
|
// vitals: VitalsConfigObject;
|
|
199
204
|
nonSHAPaymentModes: Array<string>;
|
|
205
|
+
registrationServicequeues: Array<string>;
|
|
200
206
|
}
|
|
201
207
|
|
|
202
208
|
const queueEntryActions = ['move', 'call', 'edit', 'transition', 'signOff', 'remove', 'delete', 'undo'] as const;
|
|
@@ -50,6 +50,7 @@ import { fetchPatientBills } from '../../../billing/invoice/bill.resource';
|
|
|
50
50
|
import { type QueueEntry } from '../../../types/types';
|
|
51
51
|
import { getActiveQueueEntryByPatientUuid } from '../../../service-queues/service-queues.resource';
|
|
52
52
|
import { createOrderEncounter } from '../../../shared/services/encounters.resource';
|
|
53
|
+
import { type ConfigObject } from '../../../config-schema';
|
|
53
54
|
|
|
54
55
|
interface SendToTriageModalProps {
|
|
55
56
|
patients: Patient[];
|
|
@@ -100,18 +101,19 @@ const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
|
100
101
|
shaConsulationConceptUuid,
|
|
101
102
|
outPatientCareSettingUuid,
|
|
102
103
|
orderEncounterTypeUuid,
|
|
103
|
-
|
|
104
|
+
registrationServicequeues
|
|
105
|
+
} = useConfig<ConfigObject>();
|
|
104
106
|
|
|
105
107
|
const facilityCashPoints = useMemo(() => getfacilityCashpoints(), [cashPoints, locationUuid]);
|
|
106
108
|
|
|
107
109
|
const visitTypeOptions = useMemo(
|
|
108
110
|
() => [
|
|
109
111
|
{
|
|
110
|
-
text: 'OPD
|
|
112
|
+
text: 'OPD',
|
|
111
113
|
id: VisitTypeUuids.OPD_VISIT_TYPE_UUID,
|
|
112
114
|
},
|
|
113
115
|
{
|
|
114
|
-
text: 'Inpatient
|
|
116
|
+
text: 'Inpatient',
|
|
115
117
|
id: VisitTypeUuids.INPATIENT_VISIT_TYPE_UUID,
|
|
116
118
|
},
|
|
117
119
|
],
|
|
@@ -473,8 +475,9 @@ const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
|
473
475
|
async function getServiceQueues() {
|
|
474
476
|
try {
|
|
475
477
|
const sqs = await getFacilityServiceQueues(locationUuid);
|
|
476
|
-
if (sqs.length > 0) {
|
|
477
|
-
|
|
478
|
+
if (sqs && sqs.length > 0) {
|
|
479
|
+
const triageServiceQueues = getTriageServiceQueues(sqs);
|
|
480
|
+
setServiceQueues(triageServiceQueues);
|
|
478
481
|
}
|
|
479
482
|
} catch (e) {
|
|
480
483
|
showSnackbar({
|
|
@@ -484,6 +487,11 @@ const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
|
484
487
|
});
|
|
485
488
|
}
|
|
486
489
|
}
|
|
490
|
+
function getTriageServiceQueues(serviceQueues: ServiceQueue[]){
|
|
491
|
+
return serviceQueues.filter((sq)=>{
|
|
492
|
+
return registrationServicequeues.includes(sq.uuid ?? '')
|
|
493
|
+
});
|
|
494
|
+
}
|
|
487
495
|
|
|
488
496
|
async function getPaymentMethods() {
|
|
489
497
|
const methods = await fetchPaymentModes();
|
|
@@ -780,7 +788,7 @@ const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
|
780
788
|
id="visit-type-combobox"
|
|
781
789
|
items={visitTypeOptions}
|
|
782
790
|
itemToString={(item) => (item ? item.text : '')}
|
|
783
|
-
titleText="
|
|
791
|
+
titleText="Patient Type"
|
|
784
792
|
/>
|
|
785
793
|
</div>
|
|
786
794
|
<div className={styles.formControl}>
|
|
@@ -788,7 +796,7 @@ const SendToTriageModal: React.FC<SendToTriageModalProps> = ({
|
|
|
788
796
|
<SelectItem value="" text="Select" />;
|
|
789
797
|
{serviceQueues &&
|
|
790
798
|
serviceQueues.map((sq) => {
|
|
791
|
-
return <SelectItem value={sq.uuid} text={`${sq.display}
|
|
799
|
+
return <SelectItem value={sq.uuid} text={`${sq.display}`} />;
|
|
792
800
|
})}
|
|
793
801
|
</Select>
|
|
794
802
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
|
|
2
|
-
import { type QueueEntryDto, type ServiceQueueApiResponse } from '../registry/types';
|
|
2
|
+
import { type ServiceQueue, type QueueEntryDto, type ServiceQueueApiResponse } from '../registry/types';
|
|
3
3
|
import { getLocationByUuid } from '../shared/services/location.resource';
|
|
4
4
|
|
|
5
5
|
export async function fetchServiceQueuesByLocationUuid<T>(locationUuid: string): Promise<ServiceQueueApiResponse> {
|
|
@@ -37,7 +37,7 @@ export async function createQueueEntry(createQueueEntryDto: QueueEntryDto) {
|
|
|
37
37
|
return response.json();
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export async function getFacilityServiceQueues(locationUuid: string) {
|
|
40
|
+
export async function getFacilityServiceQueues(locationUuid: string): Promise<ServiceQueue[] | undefined> {
|
|
41
41
|
const currentLocation = await getLocationByUuid(locationUuid);
|
|
42
42
|
if (!currentLocation) return;
|
|
43
43
|
const parentLocation = currentLocation.parentLocation;
|
|
@@ -49,7 +49,7 @@ export async function getFacilityServiceQueues(locationUuid: string) {
|
|
|
49
49
|
childLocations.map((c) => {
|
|
50
50
|
return c.uuid;
|
|
51
51
|
}) ?? [];
|
|
52
|
-
let sqs = [];
|
|
52
|
+
let sqs: ServiceQueue[] = [];
|
|
53
53
|
if (childLocationUuids.length > 0) {
|
|
54
54
|
for (let i = 0; i < childLocationUuids.length; i++) {
|
|
55
55
|
const s = await fetchServiceQueuesByLocationUuid(childLocationUuids[i]);
|
package/src/routes.json
CHANGED
|
@@ -147,6 +147,7 @@
|
|
|
147
147
|
{
|
|
148
148
|
"name": "service-queue-admin-dashboard-link",
|
|
149
149
|
"component": "serviceQueuesAdminLink",
|
|
150
|
+
"privileges": ["O3 View Service Queue Admin Panel"],
|
|
150
151
|
"slot": "app-menu-slot",
|
|
151
152
|
"meta": {
|
|
152
153
|
"name": "service-queue-admin",
|
|
@@ -159,7 +160,8 @@
|
|
|
159
160
|
{
|
|
160
161
|
"component": "serviceQueueAdmin",
|
|
161
162
|
"name": "service-queue-admin",
|
|
162
|
-
"slot": "service-queue-admin-dashboard-slot"
|
|
163
|
+
"slot": "service-queue-admin-dashboard-slot",
|
|
164
|
+
"privileges": ["O3 View Service Queue Admin Panel"]
|
|
163
165
|
},
|
|
164
166
|
{
|
|
165
167
|
"name": "admissions-dashboard-link",
|