@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.
- package/dist/112.js +1 -0
- package/dist/112.js.map +1 -0
- package/dist/117.js +1 -1
- package/dist/117.js.map +1 -1
- package/dist/132.js +1 -1
- package/dist/132.js.map +1 -1
- package/dist/140.js +1 -1
- package/dist/140.js.map +1 -1
- package/dist/150.js +1 -0
- package/dist/150.js.map +1 -0
- package/dist/152.js +1 -1
- package/dist/152.js.map +1 -1
- package/dist/209.js +1 -1
- package/dist/209.js.map +1 -1
- package/dist/317.js +1 -1
- package/dist/317.js.map +1 -1
- package/dist/349.js +1 -1
- package/dist/349.js.map +1 -1
- package/dist/371.js +1 -1
- package/dist/371.js.map +1 -1
- package/dist/378.js +1 -1
- package/dist/378.js.map +1 -1
- package/dist/409.js +1 -1
- package/dist/409.js.map +1 -1
- package/dist/442.js +1 -1
- package/dist/442.js.map +1 -1
- package/dist/45.js +1 -1
- package/dist/45.js.map +1 -1
- package/dist/466.js +1 -1
- package/dist/466.js.map +1 -1
- package/dist/508.js +1 -1
- package/dist/508.js.map +1 -1
- package/dist/563.js +12 -0
- package/dist/563.js.map +1 -0
- package/dist/576.js +15 -0
- package/dist/576.js.map +1 -0
- package/dist/594.js +1 -1
- package/dist/594.js.map +1 -1
- package/dist/61.js +1 -1
- package/dist/61.js.map +1 -1
- package/dist/689.js +1 -1
- package/dist/689.js.map +1 -1
- package/dist/712.js +1 -1
- package/dist/712.js.map +1 -1
- package/dist/720.js +1 -1
- package/dist/720.js.map +1 -1
- package/dist/742.js +1 -1
- package/dist/742.js.map +1 -1
- package/dist/771.js +1 -1
- package/dist/771.js.map +1 -1
- package/dist/781.js +1 -0
- package/dist/781.js.map +1 -0
- package/dist/806.js +1 -1
- package/dist/806.js.map +1 -1
- package/dist/912.js +1 -1
- package/dist/912.js.map +1 -1
- package/dist/913.js +1 -1
- package/dist/913.js.map +1 -1
- package/dist/940.js +1 -1
- package/dist/940.js.map +1 -1
- package/dist/989.js +1 -0
- package/dist/989.js.map +1 -0
- package/dist/digihmis-esm-outpatient-app.js +3 -3
- package/dist/digihmis-esm-outpatient-app.js.buildmanifest.json +192 -116
- package/dist/digihmis-esm-outpatient-app.js.map +1 -1
- package/dist/main.js +3 -14
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/patient-management/results/investigation-results.component.tsx +10 -3
- package/src/patient-management/results/results.resource.ts +8 -9
- package/dist/271.js +0 -15
- package/dist/271.js.map +0 -1
- package/dist/395.js +0 -12
- package/dist/395.js.map +0 -1
- package/dist/640.js +0 -1
- package/dist/640.js.map +0 -1
- package/dist/709.js +0 -1
- 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.
|
|
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
|
@@ -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
|
-
|
|
41
|
-
|
|
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
|
-
(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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> => {
|