Skip to content

Commit

Permalink
BREAKING: O3-2424: Rename test-results-app to be labs-app (#1360)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Kigen <[email protected]>
  • Loading branch information
brandones and denniskigen committed Sep 19, 2023
1 parent 829f8bc commit 3599b4e
Show file tree
Hide file tree
Showing 94 changed files with 55 additions and 121 deletions.
6 changes: 3 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ source_file = packages/esm-patient-immunizations-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-chart.esm-patient-test-results-app]
file_filter = packages/esm-patient-test-results-app/translations/<lang>.json
source_file = packages/esm-patient-test-results-app/translations/en.json
[openmrs-esm-patient-chart.esm-patient-labs-app]
file_filter = packages/esm-patient-labs-app/translations/<lang>.json
source_file = packages/esm-patient-labs-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ The `openmrs-esm-patient-chart` is a frontend module for the OpenMRS SPA. It con
- [Conditions](packages/esm-patient-conditions-app/README.md)
- [Forms](packages/esm-patient-forms-app/README.md)
- [Immunizations](packages/esm-patient-immunizations-app/README.md)
- [Labs](packages/esm-patient-labs-app/README.md)
- [Medications](packages/esm-patient-medications-app/README.md)
- [Notes](packages/esm-patient-notes-app/README.md)
- [Patient banner](packages/esm-patient-banner-app/README.md)
- [Patient chart](packages/esm-patient-chart-app/README.md)
- [Programs](packages/esm-patient-programs-app/README.md)
- [Test results](packages/esm-patient-test-results-app/README.md)
- [Vitals](packages/esm-patient-vitals-app/README.md)

In addition to these widgets, two other microfrontends exist that encapsulate cross-cutting concerns. These are:
Expand Down
2 changes: 0 additions & 2 deletions packages/esm-patient-flags-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalsemany": "{count} risk flag{plural}",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagDisabled": "Flag disabled",
Expand All @@ -20,7 +19,6 @@
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalsemany": "{count} flag{plural}",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"noFlagsFound": "Sorry, no flags found matching your search",
Expand Down
2 changes: 2 additions & 0 deletions packages/esm-patient-flags-app/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalsemany": "{count} risk flag{plural}",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCountfalsetwo": "{count} risk flag{plural}",
Expand All @@ -20,6 +21,7 @@
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalsemany": "{count} flag{plural}",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTermfalsetwo": "{count} flag{plural}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# esm-patient-test-results-app
# esm-patient-labs-app

The test results widget. It provides tabular and chart-based overviews of the test results available for a patient.
Functionality for viewing test results and ordering labs.

## Test Results

It provides tabular and chart-based overviews of the test results available for a patient.

IMPORTANT NOTE: To have data show up in this view, your concepts just need to have "Type: Test" or "Type: LabSet".
If you are seeing strange things showing up, like Temperature, in the Test Results viewer, then you probably just need to change the Type for your Temperature concept to something other than "Test", like finding.
Expand Down Expand Up @@ -58,4 +62,4 @@ Review your concepts to see that the hierarchy all looks right in the Dictionary

### 5. Update the config-schema file with your ConvSet codes
Go here to add the UUIDs for each of your ConvSet concepts which you want to show up in the Lab Results filters:
https://github.com/openmrs/openmrs-esm-patient-chart/blob/master/packages/esm-patient-test-results-app/src/config-schema.ts#L3
https://github.com/openmrs/openmrs-esm-patient-chart/blob/master/packages/esm-patient-labs-app/src/config-schema.ts#L3
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@openmrs/esm-patient-test-results-app",
"name": "@openmrs/esm-patient-labs-app",
"version": "5.0.0",
"license": "MPL-2.0",
"description": "Patient test results microfrontend for the OpenMRS SPA",
"browser": "dist/openmrs-esm-patient-test-results-app.js",
"description": "Patient lab order and test results microfrontend for the OpenMRS SPA",
"browser": "dist/openmrs-esm-patient-labs-app.js",
"main": "src/index.ts",
"source": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {
} from '@openmrs/esm-framework';
import { createDashboardLink, registerWorkspace } from '@openmrs/esm-patient-common-lib';
import { configSchema } from './config-schema';
import { dashboardMeta } from './dashboard.meta';
import { dashboardMeta } from './test-results/dashboard.meta';

const moduleName = '@openmrs/esm-patient-test-results-app';
const moduleName = '@openmrs/esm-patient-labs-app';

const options = {
featureName: 'patient-test-results',
featureName: 'patient-labs',
moduleName,
};

Expand All @@ -27,10 +27,12 @@ export function startupApp() {
defineConfigSchema(moduleName, configSchema);
}

export const externalOverview = getAsyncLifecycle(() => import('./overview/external-overview.component'), options);

export const resultsViewer = getAsyncLifecycle(() => import('./results-viewer'), options);
export const printModal = getAsyncLifecycle(() => import('./print-modal/print-modal.component'), options);
export const externalOverview = getAsyncLifecycle(
() => import('./test-results/overview/external-overview.extension'),
options,
);
export const resultsViewer = getAsyncLifecycle(() => import('./test-results/results-viewer'), options);
export const printModal = getAsyncLifecycle(() => import('./test-results/print-modal/print-modal.extension'), options);

export const testResultsDashboardLink =
// t('Test Results', 'Test Results')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useSWRImmutable from 'swr/immutable';
import { Concept } from '../../panel-view/types';
import { Concept } from '../../types';
import { FetchResponse, openmrsFetch } from '@openmrs/esm-framework';
import { useMemo } from 'react';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { FilterNodeProps, FilterLeafProps } from './filter-types';
import { FilterEmptyState } from '../ui-elements/resetFiltersEmptyState';
import FilterContext from './filter-context';
import styles from './filter-set.styles.scss';
import { ConfigObject } from '../config-schema';
import { ConfigObject } from '../../config-schema';

const isIndeterminate = (kids, checkboxes) => {
return kids && !kids?.every((kid) => checkboxes[kid]) && !kids?.every((kid) => !checkboxes[kid]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@carbon/react';
import { useLayoutType } from '@openmrs/esm-framework';
import { OBSERVATION_INTERPRETATION } from '@openmrs/esm-patient-common-lib';
import { OverviewPanelData } from '../overview/useOverviewData';
import { OverviewPanelData } from './useOverviewData';
import styles from './common-datatable.scss';

interface CommonDataTableProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { OBSERVATION_INTERPRETATION, getPatientUuidFromUrl } from '@openmrs/esm-patient-common-lib';
import { ObsRecord } from '../panel-view/types';
import { ObsRecord } from '../../types';
import styles from './timeline.scss';
import { ConfigurableLink, formatDate, formatTime, parseDate, usePatient } from '@openmrs/esm-framework';
import { ParsedTimeType } from '../filter/filter-types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { parseTime } from './helpers';
import { ObsRecord } from '../panel-view/types';
import { ObsRecord } from '../../types';
import Timeline from './timeline.component';

interface PanelTimelineComponentProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EmptyState } from '@openmrs/esm-patient-common-lib';
import useScrollIndicator from './useScroll';
import styles from './timeline.scss';
import { ParsedTimeType } from '../filter/filter-types';
import { ObsRecord } from '../panel-view/types';
import { ObsRecord } from '../../types';

const RecentResultsGrid = (props) => {
return <div {...props} className={styles['recent-results-grid']} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ParsedTimeType } from '../filter/filter-types';
import { ObsRecord } from '../panel-view/types';
import { ObsRecord } from '../../types';

export interface TimelineData {
parsedTimes: ParsedTimeType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from './result-panel.scss';
import { Concept, ConceptMeta, FHIRObservationResource, observationInterpretation } from './types';
import { Concept, ConceptMeta, FHIRObservationResource, observationInterpretation } from '../../types';
import { OBSERVATION_INTERPRETATION } from '@openmrs/esm-patient-common-lib';

export const getConceptUuid = (obs: FHIRObservationResource) => obs?.code.coding[0].code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
import { navigate, useLayoutType } from '@openmrs/esm-framework';
import { EmptyState } from '@openmrs/esm-patient-common-lib';
import { FilterEmptyState } from '../ui-elements/resetFiltersEmptyState';
import { ObsRecord } from './types';
import { ObsRecord } from '../../types';
import { testResultsBasePath } from '../helpers';
import LabSetPanel from './panel.component';
import Overlay from '../tablet-overlay/tablet-overlay.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Layer,
} from '@carbon/react';
import { getClass } from './helper';
import { ObsRecord } from './types';
import { ObsRecord } from '../../types';
import { formatDate, isDesktop, useLayoutType } from '@openmrs/esm-framework';

interface LabSetPanelProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo } from 'react';
import { FetchResponse, openmrsFetch, usePatient } from '@openmrs/esm-framework';
import useSWRInfinite from 'swr/infinite';
import { extractMetaInformation, getConceptUuid } from './helper';
import { Concept, ConceptMeta, FHIRObservationResource, FhirResponse, ObsRecord } from './types';
import { Concept, ConceptMeta, FHIRObservationResource, FhirResponse, ObsRecord } from '../../types';

export function useObservations() {
const { patientUuid } = usePatient();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ResultsViewer from './results-viewer';
import ResultsViewer from './results-viewer.extension';
import ResultsViewerDashboard from './results-viewer-router';

export default ResultsViewerDashboard;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Routes, Route, BrowserRouter } from 'react-router-dom';
import RoutedResultsViewer from './results-viewer';
import RoutedResultsViewer from './results-viewer.extension';

const ResultsView = ({ basePath, patientUuid }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import TreeViewWrapper from '../tree-view';
import Trendline from '../trendline/trendline.component';
import styles from './results-viewer.styles.scss';
import { Printer } from '@carbon/react/icons';
import { ConfigObject } from '../config-schema';
import { ConfigObject } from '../../config-schema';

type panelOpts = 'tree' | 'panel';
type viewOpts = 'split' | 'full';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"backToTimeline": "Back to timeline",
"cancel": "Cancel",
"date": "Date",
"dateCollected": "Displaying date collected",
"endDate": "End date",
"error": "Error",
"female": "Female",
"male": "Male",
"moreResultsAvailable": "More results available",
"observationsDisplayText": "observations",
"onDate": "on",
"orderActionNew": "New",
"ordered": "Ordered",
"other": "Other",
"print": "Print",
"printedBy": "Printed by",
"printTestResults": "Print test results",
"recentResults": "Recent Results",
"recentTestResults": "recent test results",
"referenceRange": "Reference range",
Expand All @@ -26,12 +17,10 @@
"returnToTimeline": "Return to timeline",
"seeAllResults": "See all results",
"showTree": "Show tree",
"startDate": "Start date",
"Test Results": "Test Results",
"testName": "Test name",
"testResults": "test results",
"testResults_title": "Test Results",
"thereAreNoTestResultsFound": "There are no test results found within the specified date range",
"timeline": "Timeline",
"timeOfTest": "Time of Test",
"tree": "Tree",
Expand All @@ -43,7 +32,6 @@
"trendlineRangeSelector5Years": "5 years",
"trendlineRangeSelectorAll": "All",
"trendlineRangeSelectorMonths": "6 months",
"unknown": "Unknown",
"value": "Value",
"view": "View"
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"backToTimeline": "Back to timeline",
"cancel": "Cancel",
"date": "Date",
"dateCollected": "Displaying date collected",
"endDate": "End date",
"error": "Error",
"female": "Female",
"male": "Male",
"moreResultsAvailable": "More results available",
"observationsDisplayText": "observations",
"onDate": "on",
"orderActionNew": "New",
"ordered": "Ordered",
"other": "Other",
"print": "Print",
"printedBy": "Printed by",
"printTestResults": "Print test results",
"recentResults": "Recent Results",
"recentTestResults": "recent test results",
"referenceRange": "Reference range",
Expand All @@ -26,12 +17,10 @@
"returnToTimeline": "Return to timeline",
"seeAllResults": "See all results",
"showTree": "Show tree",
"startDate": "Start date",
"Test Results": "Test Results",
"testName": "Test name",
"testResults": "test results",
"testResults_title": "Test Results",
"thereAreNoTestResultsFound": "There are no test results found within the specified date range",
"timeline": "Timeline",
"timeOfTest": "Time of Test",
"tree": "Tree",
Expand All @@ -43,7 +32,6 @@
"trendlineRangeSelector5Years": "5 years",
"trendlineRangeSelectorAll": "All",
"trendlineRangeSelectorMonths": "6 months",
"unknown": "Unknown",
"value": "Value",
"view": "View"
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"backToTimeline": "Back to timeline",
"cancel": "Cancel",
"date": "Date",
"dateCollected": "Displaying date collected",
"endDate": "End date",
"error": "Error",
"female": "Female",
"male": "Male",
"moreResultsAvailable": "More results available",
"observationsDisplayText": "observations",
"onDate": "on",
"orderActionNew": "New",
"ordered": "Ordered",
"other": "Other",
"print": "Print",
"printedBy": "Printed by",
"printTestResults": "Print test results",
"recentResults": "Recent Results",
"recentTestResults": "recent test results",
"referenceRange": "Reference range",
Expand All @@ -26,12 +17,10 @@
"returnToTimeline": "Return to timeline",
"seeAllResults": "See all results",
"showTree": "Show tree",
"startDate": "Start date",
"Test Results": "Test Results",
"testName": "Test name",
"testResults": "test results",
"testResults_title": "Test Results",
"thereAreNoTestResultsFound": "There are no test results found within the specified date range",
"timeline": "Timeline",
"timeOfTest": "Time of Test",
"tree": "Tree",
Expand All @@ -43,7 +32,6 @@
"trendlineRangeSelector5Years": "5 years",
"trendlineRangeSelectorAll": "All",
"trendlineRangeSelectorMonths": "6 months",
"unknown": "Unknown",
"value": "Value",
"view": "View"
}
Loading

0 comments on commit 3599b4e

Please sign in to comment.