move formatDate to ohif/core
This commit is contained in:
1 parent
a5170076db
commit
9145215596
8 files changed
+21
-17
No files matched your search
@@ -1,8 +1,9 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { StudyBrowser, useImageViewer, utils } from '@ohif/ui';
|
||||
import { StudyBrowser, useImageViewer } from '@ohif/ui';
|
||||
import { utils } from '@ohif/core';
|
||||
|
||||
const { getFormattedDate } = utils;
|
||||
const { formatDate } = utils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -39,7 +40,7 @@ function PanelStudyBrowser({
|
||||
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
|
||||
return {
|
||||
studyInstanceUid: qidoStudy.StudyInstanceUID,
|
||||
date: getFormattedDate(qidoStudy.StudyDate),
|
||||
date: formatDate(qidoStudy.StudyDate),
|
||||
description: qidoStudy.StudyDescription,
|
||||
modalities: qidoStudy.ModalitiesInStudy,
|
||||
numInstances: qidoStudy.NumInstances,
|
||||
|
||||
@@ -4,12 +4,12 @@ import cornerstoneTools from 'cornerstone-tools';
|
||||
import cornerstone from 'cornerstone-core';
|
||||
|
||||
import CornerstoneViewport from 'react-cornerstone-viewport';
|
||||
import OHIF from '@ohif/core';
|
||||
import { ViewportActionBar, useViewportGrid, utils } from '@ohif/ui';
|
||||
import OHIF, { utils } from '@ohif/core';
|
||||
import { ViewportActionBar, useViewportGrid } from '@ohif/ui';
|
||||
import TOOL_NAMES from './constants/toolNames';
|
||||
import id from './id';
|
||||
|
||||
const { getFormattedDate } = utils;
|
||||
const { formatDate } = utils;
|
||||
const scrollToIndex = cornerstoneTools.importInternal('util/scrollToIndex');
|
||||
|
||||
// const cine = viewportSpecificData.cine;
|
||||
@@ -246,7 +246,7 @@ function OHIFCornerstoneSRViewport({
|
||||
label: _viewportLabels[firstViewportIndexWithMatchingDisplaySetUid],
|
||||
isTracked: false,
|
||||
isLocked: false,
|
||||
studyDate: getFormattedDate(StudyDate),
|
||||
studyDate: formatDate(StudyDate),
|
||||
currentSeries: SeriesNumber,
|
||||
seriesDescription: SeriesDescription,
|
||||
modality: Modality,
|
||||
|
||||
+4
-3
@@ -1,9 +1,10 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { StudyBrowser, useImageViewer, useViewportGrid, utils } from '@ohif/ui';
|
||||
import { utils } from '@ohif/core';
|
||||
import { StudyBrowser, useImageViewer, useViewportGrid } from '@ohif/ui';
|
||||
import { useTrackedMeasurements } from '../../getContextModule';
|
||||
|
||||
const { getFormattedDate } = utils;
|
||||
const { formatDate } = utils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -73,7 +74,7 @@ function PanelStudyBrowserTracking({
|
||||
const actuallyMappedStudies = mappedStudies.map(qidoStudy => {
|
||||
return {
|
||||
studyInstanceUid: qidoStudy.StudyInstanceUID,
|
||||
date: getFormattedDate(qidoStudy.StudyDate),
|
||||
date: formatDate(qidoStudy.StudyDate),
|
||||
description: qidoStudy.StudyDescription,
|
||||
modalities: qidoStudy.ModalitiesInStudy,
|
||||
numInstances: qidoStudy.NumInstances,
|
||||
|
||||
@@ -3,17 +3,16 @@ import PropTypes from 'prop-types';
|
||||
import cornerstone from 'cornerstone-core';
|
||||
import cornerstoneTools from 'cornerstone-tools';
|
||||
import CornerstoneViewport from 'react-cornerstone-viewport';
|
||||
import OHIF, { DicomMetadataStore } from '@ohif/core';
|
||||
import OHIF, { DicomMetadataStore, utils } from '@ohif/core';
|
||||
import {
|
||||
Notification,
|
||||
ViewportActionBar,
|
||||
useViewportGrid,
|
||||
useViewportDialog,
|
||||
utils,
|
||||
} from '@ohif/ui';
|
||||
import { useTrackedMeasurements } from './../getContextModule';
|
||||
|
||||
const { getFormattedDate } = utils;
|
||||
const { formatDate } = utils;
|
||||
|
||||
// TODO -> Get this list from the list of tracked measurements.
|
||||
const {
|
||||
@@ -231,7 +230,7 @@ function TrackedCornerstoneViewport({
|
||||
label: _viewportLabels[firstViewportIndexWithMatchingDisplaySetUid],
|
||||
isTracked: trackedSeries.includes(SeriesInstanceUID),
|
||||
isLocked: false,
|
||||
studyDate: getFormattedDate(SeriesDate), // TODO: This is series date. Is that ok?
|
||||
studyDate: formatDate(SeriesDate), // TODO: This is series date. Is that ok?
|
||||
currentSeries: SeriesNumber,
|
||||
seriesDescription: SeriesDescription,
|
||||
modality: Modality,
|
||||
|
||||
Reference in new issue
Block a user