@openmrs/esm-laboratory-app 1.2.1-pre.937 → 1.2.1-pre.939

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 (134) hide show
  1. package/.eslintrc +1 -1
  2. package/.turbo/cache/a81131c603b82fc8-meta.json +1 -0
  3. package/.turbo/cache/a81131c603b82fc8.tar.zst +0 -0
  4. package/.turbo/turbo-build.log +24 -23
  5. package/dist/1026.js +1 -1
  6. package/dist/1026.js.LICENSE.txt +3 -3
  7. package/dist/1026.js.map +1 -1
  8. package/dist/1083.js +1 -1
  9. package/dist/1083.js.map +1 -1
  10. package/dist/1119.js +1 -1
  11. package/dist/1120.js +1 -1
  12. package/dist/1120.js.map +1 -1
  13. package/dist/1197.js +1 -1
  14. package/dist/1788.js +1 -1
  15. package/dist/1788.js.map +1 -1
  16. package/dist/2058.js +1 -1
  17. package/dist/2058.js.map +1 -1
  18. package/dist/2146.js +1 -1
  19. package/dist/2246.js +1 -1
  20. package/dist/2246.js.map +1 -1
  21. package/dist/2416.js +2 -0
  22. package/dist/2416.js.map +1 -0
  23. package/dist/2690.js +1 -1
  24. package/dist/2934.js +1 -1
  25. package/dist/2934.js.map +1 -1
  26. package/dist/3099.js +1 -1
  27. package/dist/3495.js +1 -1
  28. package/dist/3495.js.map +1 -1
  29. package/dist/3584.js +1 -1
  30. package/dist/3656.js +1 -1
  31. package/dist/3656.js.map +1 -1
  32. package/dist/4055.js +1 -1
  33. package/dist/4069.js +1 -1
  34. package/dist/4069.js.map +1 -1
  35. package/dist/4132.js +1 -1
  36. package/dist/4239.js +1 -1
  37. package/dist/4239.js.map +1 -1
  38. package/dist/4300.js +1 -1
  39. package/dist/4335.js +1 -1
  40. package/dist/4369.js +1 -1
  41. package/dist/4369.js.map +1 -1
  42. package/dist/4618.js +1 -1
  43. package/dist/4652.js +1 -1
  44. package/dist/4836.js +1 -0
  45. package/dist/4836.js.map +1 -0
  46. package/dist/4944.js +1 -1
  47. package/dist/5085.js +1 -1
  48. package/dist/5085.js.map +1 -1
  49. package/dist/5130.js +1 -0
  50. package/dist/5130.js.map +1 -0
  51. package/dist/5173.js +1 -1
  52. package/dist/5241.js +1 -1
  53. package/dist/5442.js +1 -1
  54. package/dist/5661.js +1 -1
  55. package/dist/6022.js +1 -1
  56. package/dist/6134.js +1 -1
  57. package/dist/6134.js.map +1 -1
  58. package/dist/6468.js +1 -1
  59. package/dist/6547.js +1 -1
  60. package/dist/6547.js.map +1 -1
  61. package/dist/6679.js +1 -1
  62. package/dist/6840.js +1 -1
  63. package/dist/6859.js +1 -1
  64. package/dist/6867.js +1 -0
  65. package/dist/6867.js.map +1 -0
  66. package/dist/7003.js +1 -1
  67. package/dist/7003.js.map +1 -1
  68. package/dist/7083.js +2 -0
  69. package/dist/7083.js.LICENSE.txt +9 -0
  70. package/dist/7083.js.map +1 -0
  71. package/dist/7097.js +1 -1
  72. package/dist/7159.js +1 -1
  73. package/dist/723.js +1 -1
  74. package/dist/7423.js +1 -1
  75. package/dist/7423.js.map +1 -1
  76. package/dist/7566.js +1 -0
  77. package/dist/7566.js.map +1 -0
  78. package/dist/7617.js +1 -1
  79. package/dist/795.js +1 -1
  80. package/dist/8163.js +1 -1
  81. package/dist/8349.js +1 -1
  82. package/dist/8554.js +1 -1
  83. package/dist/8554.js.map +1 -1
  84. package/dist/8618.js +1 -1
  85. package/dist/8667.js +1 -1
  86. package/dist/8667.js.map +1 -1
  87. package/dist/876.js +1 -1
  88. package/dist/876.js.map +1 -1
  89. package/dist/8828.js +1 -0
  90. package/dist/8828.js.map +1 -0
  91. package/dist/890.js +1 -1
  92. package/dist/8966.js +2 -0
  93. package/dist/{5283.js.LICENSE.txt → 8966.js.LICENSE.txt} +1 -1
  94. package/dist/8966.js.map +1 -0
  95. package/dist/9214.js +1 -1
  96. package/dist/9569.js +1 -1
  97. package/dist/986.js +1 -1
  98. package/dist/9879.js +1 -1
  99. package/dist/9892.js +1 -0
  100. package/dist/9892.js.map +1 -0
  101. package/dist/9900.js +1 -1
  102. package/dist/9913.js +1 -1
  103. package/dist/main.js +1 -1
  104. package/dist/main.js.map +1 -1
  105. package/dist/openmrs-esm-laboratory-app.js +1 -1
  106. package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +284 -137
  107. package/dist/openmrs-esm-laboratory-app.js.map +1 -1
  108. package/dist/routes.json +1 -1
  109. package/package.json +1 -1
  110. package/src/components/orders-table/list-order-details.component.tsx +16 -1
  111. package/src/components/orders-table/orders-data-table.component.tsx +1 -2
  112. package/src/config-schema.ts +7 -1
  113. package/src/index.ts +27 -0
  114. package/src/lab-tabs/actions/amend-lab-results-action.component.tsx +41 -0
  115. package/src/lab-tabs/actions/approve-lab-results-action.component.tsx +37 -0
  116. package/src/lab-tabs/actions/pickup-lab-request-action.component.tsx +1 -1
  117. package/src/lab-tabs/data-table-extensions/pending-review-lab-request-table.extension.tsx +16 -0
  118. package/src/lab-tabs/laboratory-tabs.component.tsx +47 -40
  119. package/src/lab-tabs/modals/approval-lab-results-modal.component.tsx +85 -0
  120. package/src/lab-tiles/laboratory-summary-tiles.component.tsx +30 -21
  121. package/src/lab-tiles/pending-review-lab-results-tile.component.tsx +22 -0
  122. package/src/laboratory-resource.ts +2 -2
  123. package/src/routes.json +38 -0
  124. package/src/types.ts +80 -1
  125. package/translations/en.json +11 -0
  126. package/.turbo/cache/8f0909ff0982f2c9-meta.json +0 -1
  127. package/.turbo/cache/8f0909ff0982f2c9.tar.zst +0 -0
  128. package/dist/5283.js +0 -2
  129. package/dist/5283.js.map +0 -1
  130. package/dist/5690.js +0 -1
  131. package/dist/5690.js.map +0 -1
  132. package/dist/9302.js +0 -2
  133. package/dist/9302.js.map +0 -1
  134. /package/dist/{9302.js.LICENSE.txt → 2416.js.LICENSE.txt} +0 -0
package/src/routes.json CHANGED
@@ -29,6 +29,10 @@
29
29
  "name": "pickup-lab-request-modal",
30
30
  "component": "pickupLabRequestModal"
31
31
  },
32
+ {
33
+ "name": "approval-lab-results-modal",
34
+ "component": "approvalLabResultsModal"
35
+ },
32
36
  {
33
37
  "name": "reject-lab-request-modal",
34
38
  "component": "rejectLabRequestModal"
@@ -36,6 +40,7 @@
36
40
  {
37
41
  "name": "all-lab-requests-table",
38
42
  "slot": "lab-panels-slot",
43
+ "order": 0,
39
44
  "component": "allLabRequestsTable",
40
45
  "meta": {
41
46
  "name": "inprogressPanel",
@@ -46,6 +51,7 @@
46
51
  "name": "inprogress-lab-requests-table",
47
52
  "slot": "lab-panels-slot",
48
53
  "component": "inprogressLabRequestsTable",
54
+ "order": 1,
49
55
  "meta": {
50
56
  "name": "inprogressPanel",
51
57
  "title": "In progress"
@@ -55,6 +61,7 @@
55
61
  "name": "completed-lab-requests-table",
56
62
  "slot": "lab-panels-slot",
57
63
  "component": "completedLabRequestsTable",
64
+ "order": 3,
58
65
  "meta": {
59
66
  "name": "completedPanel",
60
67
  "title": "Completed"
@@ -68,6 +75,16 @@
68
75
  "name": "testsOrderedTileSlot",
69
76
  "title": "Ordered tests"
70
77
  }
78
+ },
79
+ {
80
+ "name": "pending-review-tile-component",
81
+ "slot": "lab-panels-slot",
82
+ "component": "pendingReviewLabRequestsTable",
83
+ "order": 2,
84
+ "meta": {
85
+ "name": "pendingReviewPanel",
86
+ "title": "Pending review tests"
87
+ }
71
88
  },
72
89
  {
73
90
  "name": "worklist-tile-component",
@@ -78,6 +95,15 @@
78
95
  "title": "Worklist"
79
96
  }
80
97
  },
98
+ {
99
+ "name": "pending-review-list-tile-component",
100
+ "slot": "lab-tiles-slot",
101
+ "component": "pendingReviewListTile",
102
+ "meta": {
103
+ "name": "pendingReviewTileSlot",
104
+ "title": "Pending review tests"
105
+ }
106
+ },
81
107
  {
82
108
  "name": "completed-tile-component",
83
109
  "slot": "lab-tiles-slot",
@@ -91,16 +117,28 @@
91
117
  "name": "declined-tile-component",
92
118
  "slot": "lab-panels-slot",
93
119
  "component": "declinedLabRequestsTable",
120
+ "order": 4,
94
121
  "meta": {
95
122
  "name": "declinedPanel",
96
123
  "title": "Declined tests"
97
124
  }
98
125
  },
126
+
99
127
  {
100
128
  "name": "pick-lab-request-action",
101
129
  "component": "pickupLabRequestAction",
102
130
  "slot": "tests-ordered-actions-slot"
103
131
  },
132
+ {
133
+ "name": "approve-lab-results-tests-ordered-action",
134
+ "component": "approveLabResultsAction",
135
+ "slot": "approved-ordered-actions-slot"
136
+ },
137
+ {
138
+ "name": "amend-lab-results-tests-ordered-action",
139
+ "component": "amendLabResultsAction",
140
+ "slot": "amended-ordered-actions-slot"
141
+ },
104
142
  {
105
143
  "name": "reject-lab-request-tests-ordered-action",
106
144
  "component": "rejectLabRequestAction",
package/src/types.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { type Order, type FulfillerStatus, type OrderUrgency } from '@openmrs/esm-patient-common-lib';
1
+ import { type OpenmrsResource } from '@openmrs/esm-framework';
2
+ import {
3
+ type Drug,
4
+ type Concept,
5
+ type OrderUrgency,
6
+ type OrderAction as ExternalOrderAction,
7
+ } from '@openmrs/esm-patient-common-lib';
8
+ export type FulfillerStatus = 'DRAFT' | 'RECEIVED' | 'IN_PROGRESS' | 'EXCEPTION' | 'ON_HOLD' | 'DECLINED' | 'COMPLETED';
2
9
 
3
10
  export interface FlattenedOrder {
4
11
  id: string;
@@ -13,6 +20,78 @@ export interface FlattenedOrder {
13
20
  fulfillerComment: string;
14
21
  }
15
22
 
23
+ export interface Order {
24
+ uuid: string;
25
+ action: ExternalOrderAction;
26
+ asNeeded: boolean;
27
+ asNeededCondition?: string;
28
+ autoExpireDate: string;
29
+ brandName?: string;
30
+ careSetting: OpenmrsResource;
31
+ commentToFulfiller: string;
32
+ concept: Concept;
33
+ dateActivated: string;
34
+ dateStopped?: string | null;
35
+ dispenseAsWritten: boolean;
36
+ dose: number;
37
+ doseUnits: OpenmrsResource;
38
+ dosingInstructions: string | null;
39
+ dosingType?: 'org.openmrs.FreeTextDosingInstructions' | 'org.openmrs.SimpleDosingInstructions';
40
+ drug: Drug;
41
+ duration: number;
42
+ durationUnits: OpenmrsResource;
43
+ encounter: OpenmrsResource;
44
+ frequency: OpenmrsResource;
45
+ instructions?: string | null;
46
+ numRefills: number;
47
+ orderNumber: string;
48
+ orderReason: string | null;
49
+ orderReasonNonCoded: string | null;
50
+ orderType: {
51
+ conceptClasses: Array<any>;
52
+ description: string;
53
+ display: string;
54
+ name: string;
55
+ parent: string | null;
56
+ retired: boolean;
57
+ uuid: string;
58
+ };
59
+ orderer: {
60
+ display: string;
61
+ person: {
62
+ display: string;
63
+ };
64
+ uuid: string;
65
+ };
66
+ patient: OpenmrsResource;
67
+ previousOrder: { uuid: string; type: string; display: string } | null;
68
+ quantity: number;
69
+ quantityUnits: OpenmrsResource;
70
+ route: OpenmrsResource;
71
+ scheduleDate: null;
72
+ urgency: OrderUrgency;
73
+
74
+ accessionNumber: string;
75
+ scheduledDate: string;
76
+ display: string;
77
+ auditInfo: {
78
+ creator: {
79
+ uuid: string;
80
+ display: string;
81
+ };
82
+ dateCreated: string;
83
+ changedBy: string;
84
+ dateChanged: string;
85
+ };
86
+ fulfillerStatus: FulfillerStatus;
87
+ fulfillerComment: string;
88
+ specimenSource: string;
89
+ laterality: string;
90
+ clinicalHistory: string;
91
+ numberOfRepeats: string;
92
+ type: string;
93
+ }
94
+
16
95
  export interface GroupedOrders {
17
96
  patientUuid: string;
18
97
  patientId: string;
@@ -3,6 +3,11 @@
3
3
  "addLabResult": "Add lab results",
4
4
  "age": "Age",
5
5
  "all": "All",
6
+ "amendLabResults": "Amend lab results",
7
+ "approveLabResults": "Approve Lab Results",
8
+ "approveResults": "Approve Results",
9
+ "approveResultsConfirmationText": "You are about to approve and finalize these lab results. Once approved, the results will be marked as complete and made available to clinicians. Are you sure you want to proceed?",
10
+ "awaitingApproval": "Awaiting Approval",
6
11
  "cancel": "Cancel",
7
12
  "checkFilters": "Please check the filters above and try again",
8
13
  "completed": "Completed",
@@ -14,6 +19,7 @@
14
19
  "declinedStatus": "DECLINED",
15
20
  "discard": "Discard",
16
21
  "editResults": "Edit results",
22
+ "errorApprovingResults": "Error approving results",
17
23
  "errorPickingOrder": "Error picking order",
18
24
  "errorRejectingRequest": "Error rejecting lab request",
19
25
  "exceptionStatus": "EXCEPTION",
@@ -24,6 +30,7 @@
24
30
  "inProgressStatus": "IN_PROGRESS",
25
31
  "laboratory": "Laboratory",
26
32
  "Laboratory": "Laboratory",
33
+ "labResultsApprovedSuccessfully": "Lab results have been successfully approved and finalized",
27
34
  "loading": "Loading",
28
35
  "nextPage": "Next page",
29
36
  "NoInstructionLeft": "No instructions are provided.",
@@ -40,6 +47,9 @@
40
47
  "orderStatus": "Status:",
41
48
  "patient": "Patient",
42
49
  "patientId": "Patient ID",
50
+ "pending review tests": "pending review tests",
51
+ "Pending review tests": "Pending review tests",
52
+ "pendingReview": "Pending Review",
43
53
  "pickedAnOrder": "Picked an order",
44
54
  "pickRequest": "Pick lab request",
45
55
  "pickRequestConfirmationText": "Continuing will update the request status to \"In Progress\" and advance it to the next stage. Are you sure you want to proceed?",
@@ -54,6 +64,7 @@
54
64
  "rejectLabRequestSuccessMessage": "",
55
65
  "rejectLabRequestTitle": "Lab request rejected",
56
66
  "results": "Results",
67
+ "resultsApproved": "Results Approved",
57
68
  "searchThisList": "Search this list",
58
69
  "sex": "Sex",
59
70
  "tabletOverlay": "Tablet overlay",
@@ -1 +0,0 @@
1
- {"hash":"8f0909ff0982f2c9","duration":53548}