@digihmis/esm-outpatient-app 1.0.5 → 1.0.8

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 (79) hide show
  1. package/dist/112.js +1 -0
  2. package/dist/112.js.map +1 -0
  3. package/dist/117.js +1 -1
  4. package/dist/117.js.map +1 -1
  5. package/dist/132.js +1 -1
  6. package/dist/132.js.map +1 -1
  7. package/dist/140.js +1 -1
  8. package/dist/140.js.map +1 -1
  9. package/dist/150.js +1 -0
  10. package/dist/150.js.map +1 -0
  11. package/dist/152.js +1 -1
  12. package/dist/152.js.map +1 -1
  13. package/dist/209.js +1 -1
  14. package/dist/209.js.map +1 -1
  15. package/dist/317.js +1 -1
  16. package/dist/317.js.map +1 -1
  17. package/dist/349.js +1 -1
  18. package/dist/349.js.map +1 -1
  19. package/dist/371.js +1 -1
  20. package/dist/371.js.map +1 -1
  21. package/dist/378.js +1 -1
  22. package/dist/378.js.map +1 -1
  23. package/dist/409.js +1 -1
  24. package/dist/409.js.map +1 -1
  25. package/dist/442.js +1 -1
  26. package/dist/442.js.map +1 -1
  27. package/dist/45.js +1 -1
  28. package/dist/45.js.map +1 -1
  29. package/dist/466.js +1 -1
  30. package/dist/466.js.map +1 -1
  31. package/dist/508.js +1 -1
  32. package/dist/508.js.map +1 -1
  33. package/dist/563.js +12 -0
  34. package/dist/563.js.map +1 -0
  35. package/dist/576.js +15 -0
  36. package/dist/576.js.map +1 -0
  37. package/dist/594.js +1 -1
  38. package/dist/594.js.map +1 -1
  39. package/dist/61.js +1 -1
  40. package/dist/61.js.map +1 -1
  41. package/dist/689.js +1 -1
  42. package/dist/689.js.map +1 -1
  43. package/dist/712.js +1 -1
  44. package/dist/712.js.map +1 -1
  45. package/dist/720.js +1 -1
  46. package/dist/720.js.map +1 -1
  47. package/dist/742.js +1 -1
  48. package/dist/742.js.map +1 -1
  49. package/dist/771.js +1 -1
  50. package/dist/771.js.map +1 -1
  51. package/dist/781.js +1 -0
  52. package/dist/781.js.map +1 -0
  53. package/dist/806.js +1 -1
  54. package/dist/806.js.map +1 -1
  55. package/dist/912.js +1 -1
  56. package/dist/912.js.map +1 -1
  57. package/dist/913.js +1 -1
  58. package/dist/913.js.map +1 -1
  59. package/dist/940.js +1 -1
  60. package/dist/940.js.map +1 -1
  61. package/dist/989.js +1 -0
  62. package/dist/989.js.map +1 -0
  63. package/dist/digihmis-esm-outpatient-app.js +3 -3
  64. package/dist/digihmis-esm-outpatient-app.js.buildmanifest.json +192 -116
  65. package/dist/digihmis-esm-outpatient-app.js.map +1 -1
  66. package/dist/main.js +3 -14
  67. package/dist/main.js.map +1 -1
  68. package/dist/routes.json +1 -1
  69. package/package.json +1 -1
  70. package/src/patient-management/results/investigation-results.component.tsx +10 -3
  71. package/src/patient-management/results/results.resource.ts +8 -9
  72. package/dist/271.js +0 -15
  73. package/dist/271.js.map +0 -1
  74. package/dist/395.js +0 -12
  75. package/dist/395.js.map +0 -1
  76. package/dist/640.js +0 -1
  77. package/dist/640.js.map +0 -1
  78. package/dist/709.js +0 -1
  79. package/dist/709.js.map +0 -1
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.24.0"},"extensions":[{"name":"outpatient-dashboard-header","slot":"outpatient-sidebar-slot","component":"outpatientDashboardHeader","order":0,"online":true,"offline":true},{"name":"outpatient-db-link","slot":"outpatient-dashboard-slot","component":"leftPanelLink","meta":{"name":"outpatient","slot":"outpatient-homepage-dashboard-slot","title":"Outpatient queue"},"order":1,"online":true,"offline":true},{"name":"outpatient-queue-dashboard","slot":"outpatient-homepage-dashboard-slot","component":"outpatientQueueDashboard"},{"name":"care-panel-link","slot":"outpatient-dashboard-slot","component":"carePanelLink","meta":{"name":"outpatient/patient/:patientUuid/file","slot":"outpatient-file-dashboard-slot","title":"Patient file","showOnlyOnRoute":"/patient/"},"order":2,"online":true,"offline":true},{"name":"care-panel-history","slot":"outpatient-file-dashboard-slot","component":"carePanel"}],"workspaces":[],"version":"1.0.5"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.24.0"},"extensions":[{"name":"outpatient-dashboard-header","slot":"outpatient-sidebar-slot","component":"outpatientDashboardHeader","order":0,"online":true,"offline":true},{"name":"outpatient-db-link","slot":"outpatient-dashboard-slot","component":"leftPanelLink","meta":{"name":"outpatient","slot":"outpatient-homepage-dashboard-slot","title":"Outpatient queue"},"order":1,"online":true,"offline":true},{"name":"outpatient-queue-dashboard","slot":"outpatient-homepage-dashboard-slot","component":"outpatientQueueDashboard"},{"name":"care-panel-link","slot":"outpatient-dashboard-slot","component":"carePanelLink","meta":{"name":"outpatient/patient/:patientUuid/file","slot":"outpatient-file-dashboard-slot","title":"Patient file","showOnlyOnRoute":"/patient/"},"order":2,"online":true,"offline":true},{"name":"care-panel-history","slot":"outpatient-file-dashboard-slot","component":"carePanel"}],"workspaces":[],"version":"1.0.8"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digihmis/esm-outpatient-app",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Outpatient microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/digihmis-esm-outpatient-app.js",
6
6
  "main": "src/index.ts",
@@ -12,7 +12,7 @@ import {
12
12
  Tag,
13
13
  Tile,
14
14
  } from '@carbon/react';
15
- import { formatDatetime, parseDate, useConfig } from '@openmrs/esm-framework';
15
+ import { ExtensionSlot, formatDatetime, parseDate, useConfig } from '@openmrs/esm-framework';
16
16
  import { type ConfigObject } from '../../config-schema';
17
17
  import {
18
18
  formatLabValue,
@@ -120,7 +120,7 @@ export const LabResults: React.FC<{ patientUuid: string }> = ({ patientUuid }) =
120
120
 
121
121
  // ---- Shared report list (imaging + procedure) ---------------------------------
122
122
 
123
- const ReportCard: React.FC<{ record: ProcedureRecord }> = ({ record }) => {
123
+ const ReportCard: React.FC<{ record: ProcedureRecord; showImages?: boolean }> = ({ record, showImages }) => {
124
124
  const { t } = useTranslation();
125
125
  const findings = record.procedureReport || record.preliminaryReport;
126
126
  return (
@@ -147,6 +147,13 @@ const ReportCard: React.FC<{ record: ProcedureRecord }> = ({ record }) => {
147
147
  <p className={styles.reportText}>{record.impressions}</p>
148
148
  </div>
149
149
  )}
150
+ {showImages && record.orderUuid && (
151
+ <div className={styles.section}>
152
+ <p className={styles.sectionLabel}>{t('images', 'Images')}</p>
153
+ {/* Filled by the imaging app: uploaded attachments + DICOM/PACS preview + Open in OHIF. */}
154
+ <ExtensionSlot name="imaging-study-viewer-slot" state={{ orderUuid: record.orderUuid, readOnly: true }} />
155
+ </div>
156
+ )}
150
157
  </Tile>
151
158
  </Layer>
152
159
  );
@@ -181,7 +188,7 @@ const ProcedureReportList: React.FC<{
181
188
  return (
182
189
  <div className={styles.list}>
183
190
  {filtered.map((record) => (
184
- <ReportCard key={record.uuid} record={record} />
191
+ <ReportCard key={record.uuid} record={record} showImages={variant === 'imaging'} />
185
192
  ))}
186
193
  </div>
187
194
  );
@@ -37,9 +37,8 @@ const PROCEDURE_REP =
37
37
  * by concept-set membership). Newest first.
38
38
  */
39
39
  export function useProcedureRecords(patientUuid: string) {
40
- const url = patientUuid
41
- ? `${restBaseUrl}/digihmisorders/procedure?patient=${patientUuid}&v=${PROCEDURE_REP}`
42
- : null;
40
+ // The Procedure resource is registered at /ws/rest/v1/procedure (NOT under /digihmisorders).
41
+ const url = patientUuid ? `${restBaseUrl}/procedure?patient=${patientUuid}&v=${PROCEDURE_REP}` : null;
43
42
  const { data, error, isLoading, mutate } = useSWR<{ data: { results: Array<ProcedureRecord> } }>(url, openmrsFetch);
44
43
  const procedures = (data?.data?.results ?? [])
45
44
  .slice()
@@ -92,12 +91,12 @@ export function useLabResults(patientUuid: string) {
92
91
  async (url: string) => {
93
92
  const response = await openmrsFetch<{ results: Array<LabOrder> }>(url);
94
93
  const orders = response?.data?.results ?? [];
95
- const testOrders = orders.filter(
96
- (order) =>
97
- order?.orderType?.display?.toLowerCase().includes('test') &&
98
- order?.fulfillerStatus === 'COMPLETED' &&
99
- order?.action !== 'DISCONTINUE',
100
- );
94
+ const testOrders = orders.filter((order) => {
95
+ const type = order?.orderType?.display?.toLowerCase() ?? '';
96
+ const isLabOrder = type.includes('test') || type.includes('lab');
97
+ // Show the patient's full lab history: any completed test order, across every visit.
98
+ return isLabOrder && order?.fulfillerStatus === 'COMPLETED' && order?.action !== 'DISCONTINUE';
99
+ });
101
100
 
102
101
  const records = await Promise.all(
103
102
  testOrders.map(async (order): Promise<LabResultRecord> => {