Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Feb 24, 2024
1 parent 8a89f07 commit 7793e3c
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion e2e/commands/patient-operations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { APIRequestContext, expect } from '@playwright/test';
import { type APIRequestContext, expect } from '@playwright/test';

export interface Patient {
uuid: string;
Expand Down
4 changes: 2 additions & 2 deletions e2e/commands/visit-operations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APIRequestContext, expect } from '@playwright/test';
import { Visit } from '@openmrs/esm-framework';
import { type APIRequestContext, expect } from '@playwright/test';
import { type Visit } from '@openmrs/esm-framework';
import dayjs from 'dayjs';

export const startVisit = async (api: APIRequestContext, patientId: string): Promise<Visit> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FormResourceService {
}

public getFormMetaDataByUuid(uuid: string, v: string = null) {
const url = `${this.windowRef.openmrsRestBase}form/${uuid}`;
const url = `${this.windowRef.openmrsRestBase}/form/${uuid}`;
const params: HttpParams = new HttpParams().set('v', v && v.length > 0 ? v : 'full');
return this.http.get<FormMetadataObject>(url, { params });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-form-entry-app/src/app/window-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export class WindowRef {
}

get openmrsRestBase(): string {
return this.nativeWindow.openmrsBase + restBaseUrl;
return this.nativeWindow.openmrsBase + restBaseUrl + '/';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React, { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import debounce from 'lodash-es/debounce';
import fuzzy from 'fuzzy';
import { DataTableSkeleton, Tile } from '@carbon/react';
import { DataTableSkeleton } from '@carbon/react';
import { formatDatetime, useLayoutType, ResponsiveWrapper } from '@openmrs/esm-framework';
import type { CompletedFormInfo } from '../types';
import FormsTable from './forms-table.component';
import styles from './forms-list.scss';
import type { CompletedFormInfo } from '../types';

export type FormsListProps = {
completedForms?: Array<CompletedFormInfo>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
DataTable,
Link,
Expand All @@ -12,10 +13,8 @@ import {
TableToolbar,
TableToolbarContent,
TableToolbarSearch,
Tile,
} from '@carbon/react';
import styles from './forms-table.scss';
import { useTranslation } from 'react-i18next';

interface FormsTableProps {
tableHeaders: Array<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { type DefaultWorkspaceProps, launchPatientWorkspace, useOrderBasket } fr
import { DrugOrderForm } from './drug-order-form.component';
import { useSession } from '@openmrs/esm-framework';
import { careSettingUuid, prepMedicationOrderPostData } from '../api/api';
import type { DrugOrderBasketItem } from '../types';
import { ordersEqual } from './drug-search/helpers';
import type { DrugOrderBasketItem } from '../types';

export interface AddDrugOrderWorkspaceAdditionalProps {
order: DrugOrderBasketItem;
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-medications-app/src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useSWR, { mutate } from 'swr';
import { type FetchResponse, openmrsFetch, toOmrsIsoString, useConfig, restBaseUrl } from '@openmrs/esm-framework';
import { type FetchResponse, openmrsFetch, useConfig, restBaseUrl } from '@openmrs/esm-framework';
import { type ConfigObject } from '../config-schema';
import { useCallback, useMemo } from 'react';
import { type OrderPost, type PatientOrderFetchResponse } from '@openmrs/esm-patient-common-lib';
Expand Down
1 change: 0 additions & 1 deletion packages/esm-patient-notes-app/src/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export const configSchema = {
};

export interface ConfigObject {
[x: string]: any;
visitNoteConfig: VisitNoteConfigObject;
}
2 changes: 1 addition & 1 deletion packages/esm-patient-orders-app/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function createEmptyEncounter(
obs: [],
};

return openmrsFetch<OpenmrsResource>('${restBaseUrl}/encounter', {
return openmrsFetch<OpenmrsResource>(`${restBaseUrl}/encounter`, {
headers: {
'Content-Type': 'application/json',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import dayjs from 'dayjs';
import capitalize from 'lodash-es/capitalize';
import orderBy from 'lodash-es/orderBy';
import { useTranslation } from 'react-i18next';
import { useReactToPrint } from 'react-to-print';
import {
DataTable,
Button,
DataTable,
DataTableSkeleton,
Dropdown,
IconButton,
InlineLoading,
OverflowMenu,
Expand All @@ -15,31 +20,27 @@ import {
TableHead,
TableHeader,
TableRow,
Dropdown,
DataTableSkeleton,
Tooltip,
} from '@carbon/react';
import { Add, User, Printer } from '@carbon/react/icons';
import {
CardHeader,
type Order,
type OrderBasketItem,
PatientChartPagination,
useOrderBasket,
useLaunchWorkspaceRequiringVisit,
type OrderType,
CardHeader,
EmptyState,
ErrorState,
usePatientOrders,
PatientChartPagination,
useLaunchWorkspaceRequiringVisit,
useOrderBasket,
useOrderTypes,
usePatientOrders,
} from '../../../esm-patient-common-lib';
import { Add, User, Printer } from '@carbon/react/icons';
import { age, formatDate, useConfig, useLayoutType, usePagination, usePatient } from '@openmrs/esm-framework';
import { useTranslation } from 'react-i18next';
import styles from './order-details-table.scss';
import { useReactToPrint } from 'react-to-print';
import { compare, orderPriorityToColor } from '../utils/utils';
import PrintComponent from '../print/print.component';
import { orderBy } from 'lodash-es';
import { Tooltip } from '@carbon/react';
import styles from './order-details-table.scss';

interface OrderDetailsProps {
title?: string;
patientUuid: string;
Expand Down

0 comments on commit 7793e3c

Please sign in to comment.