@palladium-ethiopia/esm-clinical-workflow-app 5.4.2-pre.4 → 5.4.2-pre.6

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.
Files changed (44) hide show
  1. package/.turbo/turbo-build.log +8 -2
  2. package/dist/112.js +1 -0
  3. package/dist/112.js.map +1 -0
  4. package/dist/127.js +1 -1
  5. package/dist/449.js +1 -1
  6. package/dist/449.js.map +1 -1
  7. package/dist/467.js +6 -0
  8. package/dist/467.js.map +1 -0
  9. package/dist/54.js +1 -0
  10. package/dist/54.js.map +1 -0
  11. package/dist/542.js +1 -1
  12. package/dist/542.js.map +1 -1
  13. package/dist/{532.js → 813.js} +18 -18
  14. package/dist/813.js.map +1 -0
  15. package/dist/834.js +1 -0
  16. package/dist/834.js.map +1 -0
  17. package/dist/916.js +1 -1
  18. package/dist/ethiopia-esm-clinical-workflow-app.js +3 -3
  19. package/dist/ethiopia-esm-clinical-workflow-app.js.buildmanifest.json +103 -122
  20. package/dist/ethiopia-esm-clinical-workflow-app.js.map +1 -1
  21. package/dist/main.js +10 -5
  22. package/dist/main.js.map +1 -1
  23. package/dist/routes.json +1 -1
  24. package/package.json +1 -1
  25. package/src/config-schema.ts +16 -0
  26. package/src/index.ts +15 -0
  27. package/src/mru/billing-information/billing-information.resource.ts +137 -0
  28. package/src/mru/billing-information/billing-information.scss +55 -0
  29. package/src/mru/billing-information/billing-information.workspace.tsx +369 -0
  30. package/src/mru/dashboard.component.tsx +18 -0
  31. package/src/mru/mru.component.tsx +106 -0
  32. package/src/mru/mru.scss +28 -0
  33. package/src/routes.json +25 -1
  34. package/translations/am.json +36 -1
  35. package/translations/en.json +36 -1
  36. package/dist/40.js +0 -1
  37. package/dist/532.js.map +0 -1
  38. package/dist/593.js +0 -6
  39. package/dist/593.js.map +0 -1
  40. package/dist/77.js +0 -1
  41. package/dist/77.js.map +0 -1
  42. package/dist/972.js +0 -1
  43. package/dist/972.js.map +0 -1
  44. package/translations/sw.json +0 -19
@@ -0,0 +1,106 @@
1
+ import React from 'react';
2
+ import { Button, InlineLoading, Layer } from '@carbon/react';
3
+ import {
4
+ ExtensionSlot,
5
+ PageHeader,
6
+ RegistrationPictogram,
7
+ fetchCurrentPatient,
8
+ launchWorkspace,
9
+ navigate,
10
+ useConfig,
11
+ useVisit,
12
+ } from '@openmrs/esm-framework';
13
+ import { useTranslation } from 'react-i18next';
14
+ import { Close, Edit, Money } from '@carbon/react/icons';
15
+ import useSWR from 'swr';
16
+ import { useParams } from 'react-router-dom';
17
+
18
+ import styles from './mru.scss';
19
+ import { type ClinicalWorkflowConfig } from '../config-schema';
20
+ const MRU: React.FC = () => {
21
+ const { t } = useTranslation();
22
+
23
+ return (
24
+ <div>
25
+ <PageHeader
26
+ title={t('medicalRecordUpdate', 'Medical Record Update(MRU)')}
27
+ illustration={<RegistrationPictogram />}
28
+ className={styles.pageHeader}
29
+ />
30
+ <PatientSearch />
31
+ </div>
32
+ );
33
+ };
34
+
35
+ export default MRU;
36
+
37
+ const PatientSearch: React.FC = () => {
38
+ const params = useParams<{ patientUuid: string }>();
39
+ const { t } = useTranslation();
40
+ const { billingVisitAttributeTypes } = useConfig<ClinicalWorkflowConfig>();
41
+ const [patientUuid, setPatientUuid] = React.useState<string>(params.patientUuid || undefined);
42
+ const { data: patient, isLoading } = useSWR(patientUuid ? ['patient', patientUuid] : null, () =>
43
+ fetchCurrentPatient(patientUuid!),
44
+ );
45
+ const { activeVisit } = useVisit(patientUuid);
46
+
47
+ // TODO: Add ability for user to edit billing information
48
+ const hasAtLeastOneBillingInformation = activeVisit?.attributes?.some(
49
+ (attribute) => attribute.attributeType.uuid === billingVisitAttributeTypes.paymentMethod,
50
+ );
51
+
52
+ const handleLaunchBillingInformationWorkspace = () => {
53
+ launchWorkspace('billing-information-workspace', {
54
+ patientUuid: patientUuid,
55
+ });
56
+ };
57
+
58
+ const handlePatientInformationEdit = () => {
59
+ navigate({ to: `${window.spaBase}/patient/${patientUuid}/edit` });
60
+ };
61
+
62
+ return (
63
+ <div className={styles.patientSearchContainer}>
64
+ <Layer>
65
+ <ExtensionSlot
66
+ name="patient-search-bar-slot"
67
+ state={{
68
+ selectPatientAction: (patientUuid: string) => setPatientUuid(patientUuid),
69
+ buttonProps: {
70
+ kind: 'secondary',
71
+ },
72
+ }}
73
+ />
74
+ </Layer>
75
+ {isLoading && <InlineLoading description={t('loading', 'Loading...')} />}
76
+ {patient && (
77
+ <div className={styles.patientHeaderContainer}>
78
+ <div className={styles.patientHeaderActions}>
79
+ <Button kind="ghost" size="md" renderIcon={Edit} onClick={handlePatientInformationEdit}>
80
+ {t('editPatientInformation', 'Edit Patient Information')}
81
+ </Button>
82
+ <Button
83
+ disabled={hasAtLeastOneBillingInformation}
84
+ kind="ghost"
85
+ size="md"
86
+ renderIcon={Money}
87
+ onClick={handleLaunchBillingInformationWorkspace}>
88
+ {t('addBillingInformation', 'Add Billing Information')}
89
+ </Button>
90
+ <Button kind="ghost" size="md" renderIcon={Close} onClick={() => setPatientUuid(undefined)}>
91
+ {t('close', 'Close')}
92
+ </Button>
93
+ </div>
94
+ <ExtensionSlot
95
+ name="patient-header-slot"
96
+ state={{
97
+ patient,
98
+ patientUuid: patientUuid,
99
+ hideActionsOverflow: true,
100
+ }}
101
+ />
102
+ </div>
103
+ )}
104
+ </div>
105
+ );
106
+ };
@@ -0,0 +1,28 @@
1
+ @use '@carbon/layout';
2
+ @use '@carbon/type';
3
+ @use '@carbon/colors';
4
+
5
+ .pageHeader {
6
+ border-bottom: 1px solid colors.$gray-20;
7
+ }
8
+
9
+ .patientSearchContainer {
10
+ padding: layout.$spacing-05;
11
+ background-color: colors.$gray-10;
12
+
13
+ & form {
14
+ border: none;
15
+ }
16
+ }
17
+
18
+ .patientHeaderContainer {
19
+ margin-top: layout.$spacing-05;
20
+ border: 1px solid colors.$gray-20;
21
+ background-color: colors.$white;
22
+ }
23
+
24
+ .patientHeaderActions {
25
+ display: flex;
26
+ justify-content: flex-end;
27
+ align-items: center;
28
+ }
package/src/routes.json CHANGED
@@ -23,7 +23,25 @@
23
23
  "name": "triage-dashboard",
24
24
  "component": "triageDashboard",
25
25
  "slot":"triage-dashboard-slot"
26
- }
26
+ },
27
+ {
28
+ "name": "ewf-mru-dashboard-link",
29
+ "component": "mruLeftPanelLink",
30
+ "slot": "homepage-dashboard-slot",
31
+ "meta": {
32
+ "name": "mru",
33
+ "title": "MRU",
34
+ "path": "mru",
35
+ "slot": "mru-dashboard-slot"
36
+ }
37
+ },
38
+ {
39
+ "name": "ewf-mru-dashboard",
40
+ "component": "mruDashboard",
41
+ "slot": "mru-dashboard-slot",
42
+ "online": true,
43
+ "offline": false
44
+ }
27
45
  ],
28
46
 
29
47
  "workspaces": [
@@ -40,6 +58,12 @@
40
58
  "title": "Patient Registration",
41
59
  "canMaximize": true,
42
60
  "type": "registration-form"
61
+ },
62
+ {
63
+ "name": "billing-information-workspace",
64
+ "component": "billingInformationWorkspace",
65
+ "title": "Billing Information Workspace",
66
+ "type": "clinical-form"
43
67
  }
44
68
  ],
45
69
  "modals": [
@@ -1,19 +1,54 @@
1
1
  {
2
+ "24Hours": "24 Hours",
3
+ "addBillingInformation": "Add Billing Information",
4
+ "cash": "Cash",
2
5
  "centralTriage": "Central triage",
6
+ "chbi": "CHBI",
7
+ "close": "Close",
8
+ "code": "Code",
9
+ "credit": "Credit",
10
+ "creditCompanies": "Credit Companies",
11
+ "creditDetails": "Credit Details",
12
+ "creditTypeDetails": "Credit Type Details",
13
+ "discard": "Discard",
14
+ "editPatientInformation": "Edit Patient Information",
3
15
  "emergencyTriage": "Emergency triage",
16
+ "enterCode": "Enter code",
4
17
  "enterFirstName": "Enter First Name",
18
+ "enterId": "Enter ID",
5
19
  "enterLastName": "Enter Last Name",
6
20
  "enterMiddleName": "Enter Middle Name",
21
+ "enterName": "Enter name",
22
+ "enterZone": "Enter zone",
23
+ "error": "Error",
24
+ "errorUpdatingBillingInformation": "Error updating billing information, {{error}}",
25
+ "exempted": "Exempted",
26
+ "expiryDate": "Expiry Date",
7
27
  "firstName": "First Name",
28
+ "free": "Free",
29
+ "freeDetails": "Free Details",
8
30
  "gender": "Gender",
31
+ "id": "ID",
32
+ "insurance": "Insurance",
9
33
  "lastName": "Last Name",
34
+ "loading": "Loading...",
35
+ "medicalRecordUpdate": "Medical Record Update(MRU)",
10
36
  "middleName": "Middle Name",
37
+ "name": "Name",
38
+ "paymentMethods": "Payment Methods",
11
39
  "pediatricsTriage": "Pediatrics triage",
12
40
  "registerNewPatient": "Register New Patient",
41
+ "saveAndClose": "Save & Close",
13
42
  "selectDOB": "Select Date of Birth",
14
43
  "selectGender": "Select gender",
44
+ "selectOption": "Select a free type",
45
+ "shi": "SHI",
46
+ "staff": "Staff",
15
47
  "submitRegistration": "Submit Registration",
16
48
  "triageDashboard": "Triage Dashboard",
17
49
  "triageDashboardErrorStartingVisit": "Error starting visit for patient",
18
- "triageDashboardPleaseTryAgain": "Please try again."
50
+ "triageDashboardPleaseTryAgain": "Please try again.",
51
+ "updateVisitWithBillingInfo": "Update Visit With Billing Information",
52
+ "updateVisitWithBillingInfoSuccess": "Update Visit With Billing Information Success",
53
+ "zone": "Zone"
19
54
  }
@@ -1,19 +1,54 @@
1
1
  {
2
+ "24Hours": "24 Hours",
3
+ "addBillingInformation": "Add Billing Information",
4
+ "cash": "Cash",
2
5
  "centralTriage": "Central triage",
6
+ "chbi": "CHBI",
7
+ "close": "Close",
8
+ "code": "Code",
9
+ "credit": "Credit",
10
+ "creditCompanies": "Credit Companies",
11
+ "creditDetails": "Credit Details",
12
+ "creditTypeDetails": "Credit Type Details",
13
+ "discard": "Discard",
14
+ "editPatientInformation": "Edit Patient Information",
3
15
  "emergencyTriage": "Emergency triage",
16
+ "enterCode": "Enter code",
4
17
  "enterFirstName": "Enter First Name",
18
+ "enterId": "Enter ID",
5
19
  "enterLastName": "Enter Last Name",
6
20
  "enterMiddleName": "Enter Middle Name",
21
+ "enterName": "Enter name",
22
+ "enterZone": "Enter zone",
23
+ "error": "Error",
24
+ "errorUpdatingBillingInformation": "Error updating billing information, {{error}}",
25
+ "exempted": "Exempted",
26
+ "expiryDate": "Expiry Date",
7
27
  "firstName": "First Name",
28
+ "free": "Free",
29
+ "freeDetails": "Free Details",
8
30
  "gender": "Gender",
31
+ "id": "ID",
32
+ "insurance": "Insurance",
9
33
  "lastName": "Last Name",
34
+ "loading": "Loading...",
35
+ "medicalRecordUpdate": "Medical Record Update(MRU)",
10
36
  "middleName": "Middle Name",
37
+ "name": "Name",
38
+ "paymentMethods": "Payment Methods",
11
39
  "pediatricsTriage": "Pediatrics triage",
12
40
  "registerNewPatient": "Register New Patient",
41
+ "saveAndClose": "Save & Close",
13
42
  "selectDOB": "Select Date of Birth",
14
43
  "selectGender": "Select gender",
44
+ "selectOption": "Select a free type",
45
+ "shi": "SHI",
46
+ "staff": "Staff",
15
47
  "submitRegistration": "Submit Registration",
16
48
  "triageDashboard": "Triage Dashboard",
17
49
  "triageDashboardErrorStartingVisit": "Error starting visit for patient",
18
- "triageDashboardPleaseTryAgain": "Please try again."
50
+ "triageDashboardPleaseTryAgain": "Please try again.",
51
+ "updateVisitWithBillingInfo": "Update Visit With Billing Information",
52
+ "updateVisitWithBillingInfoSuccess": "Update Visit With Billing Information Success",
53
+ "zone": "Zone"
19
54
  }
package/dist/40.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_palladium_ethiopia_esm_clinical_workflow_app=globalThis.webpackChunk_palladium_ethiopia_esm_clinical_workflow_app||[]).push([["40"],{3987:function(e){e.exports=JSON.parse('{"centralTriage":"Central triage","emergencyTriage":"Emergency triage","enterFirstName":"Enter First Name","enterLastName":"Enter Last Name","enterMiddleName":"Enter Middle Name","firstName":"First Name","gender":"Gender","lastName":"Last Name","middleName":"Middle Name","pediatricsTriage":"Pediatrics triage","registerNewPatient":"Register New Patient","selectDOB":"Select Date of Birth","selectGender":"Select gender","submitRegistration":"Submit Registration","triageDashboard":"Triage Dashboard","triageDashboardErrorStartingVisit":"Error starting visit for patient","triageDashboardPleaseTryAgain":"Please try again."}')}}]);