-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Removed the study summary special handling
- Loading branch information
1 parent
d274163
commit ee992bd
Showing
5 changed files
with
49 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
extensions/cornerstone/src/components/StudySummaryFromMetadata.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { DicomMetadataStore, utils } from '@ohif/core'; | ||
import { StudySummary } from '@ohif/ui-next'; | ||
|
||
const { formatDate } = utils; | ||
|
||
export function StudySummaryFromMetadata({ studyInstanceUID }) { | ||
if (!studyInstanceUID) { | ||
return null; | ||
} | ||
const studyMeta = DicomMetadataStore.getStudy(studyInstanceUID); | ||
if (!studyMeta?.series?.length) { | ||
return null; | ||
} | ||
|
||
const instanceMeta = studyMeta.series[0].instances[0]; | ||
const { StudyDate, StudyDescription } = instanceMeta; | ||
|
||
return ( | ||
<StudySummary | ||
date={formatDate(StudyDate)} | ||
description={StudyDescription} | ||
></StudySummary> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters