OCR-based extraction of clinical data from DICOM SC images
Techniques of facilitating processing of at least one DICOM SC image—e.g., using a PC or workstation in a hospital or an institution—to automatically extract clinical data therein are provided. Characters associated with the clinical data are extracted from the at least one DICOM SC image based on configuration information associated with the at least one DICOM SC image, which configuration information is obtained based on the at least one DICOM SC image.
1 . A computer-implemented method comprising:
parsing, by at least one processor, at least one Digital Imaging and Communications in Medicine (DICOM) file comprising DICOM tags to identify at least one DICOM Secondary Capture (SC) image and to extract metadata associated with the at least one DICOM SC image;
determining, by the at least one processor, a SC image type based on at least one of a content pattern of pixel data of the at least one DICOM SC image or an image structure identified from the extracted metadata;
obtaining, by the at least one processor, configuration information associated with the determined SC image type, the configuration information comprising a grid-size defining sections within the pixel data of the at least one DICOM SC image, pre-defined variables associated with clinical data, and optical character recognition (OCR) page segmentation modes (PSMs) mapped to the sections;
segmenting, by the at least one processor, the pixel data of the at least one DICOM SC image into sub-images according to the grid-size;
selecting, by the at least one processor, one or more of the sub-images corresponding to the pre-defined variables associated with the clinical data and excluding remaining ones of the sub-images from further text extraction processing to condense the pixel data;
applying, by the at least one processor, optical character recognition to only the selected one or more sub-images using the OCR page segmentation modes;
generating, by the at least one processor, an output having a required structure of content comprising extracted textual content associated with the pre-defined variables; and
storing the output.
2 . The method of claim 1 , further comprising:
converting, by the at least one processor, the at least one DICOM SC image to any one of the following image formats: tag image file format, raw image format, bitmap image file format, or portable network graphic format.
3 . The method of claim 1 , further comprising:
trimming, by the at least one processor, margins of the at least one DICOM SC image.
4 . The method of claim 1 , wherein the configuration information comprises one or more keywords of the characters associated with the clinical data, and the segmenting is further based on the one or more keywords.
5 . The method of claim 4 , wherein the one or more keywords are determined by the applying optical character recognition to the at least one DICOM SC image.
6 . The method of claim 1 , wherein the configuration information comprises a template of the at least one DICOM SC image, and the segmenting is further based on the template.
7 . The method of claim 1 , further comprising:
determining, by the at least one processor, an arrangement of the characters in each of the selected one or more sub-images, wherein the arrangement comprises row-wise, column-wise, or tabular.
8 . The method of claim 7 , wherein the arrangement is row-wise, the method further comprising:
splitting, by the at least one processor, the selected one or more sub-images into rows; and
applying, by the at least one processor, the optical character recognition to each of the split rows to extract the characters therein.
9 . The method of claim 7 , wherein the arrangement is column-wise, the method further comprising:
splitting, by the at least one processor, the selected one or more sub-images into columns; and
applying, by the at least one processor, the optical character recognition to each of the split columns to extract the characters therein.
10 . The method of claim 7 , wherein the arrangement is tabular, the method further comprising:
splitting, by the at least one processor, the selected one or more sub-images into both rows and columns, respectively;
applying, by the at least one processor, the optical character recognition to each of the split rows and to each of the split columns to extract the characters therein, respectively; and
determining, by the at least one processor, a position within a table of each of the extracted characters based on positions in both the row-wisely and column-wisely extracted characters.
11 . The method of claim 1 , further comprising:
extracting, by the at least one processor, the DICOM tags from a header of the at least one DICOM SC image.
12 . The method of claim 11 , further comprising:
pairing, by the at least one processor, the extracted DICOM tags with the extracted characters associated with the clinical data; or
removing, by the at least one processor, patient health information from the extracted characters associated with the clinical data.
13 . A computing device comprising:
at least one processor; and
at least one memory;
wherein upon loading and executing program code from the at least one memory, the at least one processor is configured to:
parse at least one Digital Imaging and Communications in Medicine (DICOM) file comprising DICOM tags to identify at least one DICOM Secondary Capture (SC) image and to extract metadata associated with the at least one DICOM SC image;
determine a SC image type based on at least one of a content pattern of pixel data of the at least one DICOM SC image or an image structure identified from the extracted metadata:
obtain configuration information associated with the determined SC image type, the configuration information comprising a predefined spatial extraction profile including sub-region coordinate boundaries within the pixel data of the at least one DICOM SC image, variable identifiers associated with clinical data, and optical character recognition (OCR) segmentation parameters mapped to the predefined sub-region coordinate boundaries;
segment the pixel data of the at least one DICOM SC image into sub-images according to the sub-region coordinate boundaries;
identify a subset of the plurality of sub-images corresponding to the variable identifiers associated with the clinical data and excluding remaining ones of the sub-images from further text extraction processing;
apply optical character recognition to only the identified subset of sub-images using the OCR segmentation parameters;
generate structured extracted clinical data comprising extracted textual content associated with the variable identifiers; and
store the structured extracted clinical data in association with at least one DICOM metadata field.
14 . The computing device of claim 13 , wherein the at least one processor is further configured to trim margins of the at least one DICOM SC image.
15 . The computing device of claim 13 , wherein the at least one processor is further configured to determine an arrangement of the characters in each of the plurality of sub-images, wherein the arrangement comprises row-wise, column-wise, or tabular.
16 . The computing device of claim 13 , wherein the at least one processor is further configured to extract the DICOM tags from a header of the at least one DICOM SC image.
17 . The computing device of claim 16 , wherein the at least one processor is further configured to:
pair the extracted DICOM tags with the extracted characters associated with the clinical data; or
remove patient health information from the extracted characters associated with the clinical data.