Medical record management system and method based on OCR (Optical Character Recognition)
Through the OCR recognition technology combined with camera and fill-up light device, the problem of incompatibility in the identification of ID cards and social security cards in the case management system is solved, the cost is reduced, the identification accuracy and environmental adaptability are improved, and the case management process is optimized.
Patent Information
- Application Number
- CN202510244174.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-07-08
AI Technical Summary
In the existing medical record management system, the ID card identification module is costly and incompatible with social security cards, it is prone to electromagnetic interference, has low accuracy in identifying complex or uncommon words, high error rate in manual entry, and poor recognition accuracy in dim environments.
The camera is used to combine the fill light device and the image correction module, which is compatible with ID card and social security card recognition. Through template matching and OCR recognition technology, the direction and distortion of the document are corrected, and the text confirmation method is combined to improve the recognition accuracy and reduce costs.
It realizes compatible identification of ID cards and social security cards, reduces equipment costs, avoids the impact of poor contact and electromagnetic interference, improves identification accuracy and environmental adaptability, and optimizes the case management process.
Smart Images

Figure CN120280064A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the technical field of medical record management, and particularly to a medical record management system and method based on OCR identity recognition. Background Art
[0002] Before clinical examinations, medical staff need to confirm patient information through ID cards or social security cards to create medical records. Manually creating medical records is time-consuming and laborious, and input errors are likely to occur. The ID card recognition modules of existing follow-up boxes or health integrated machines use external ID card readers for recognition, which are costly. Moreover, if compatibility reading of ID cards and social security cards is required, more costs are needed to upgrade the card reader, or the social security card information needs to be manually entered, and it may be affected by environmental factors during use. For example, strong electromagnetic interference may affect the normal reading function of the card reader. If there are large electromagnetic devices such as motors and transformers nearby, it may cause unstable or incorrect reading of information by the card reader. The recognition accuracy of existing OCR recognition models for some complex or rare characters is not high. Therefore, this application provides a medical record management system and method based on OCR identity recognition to solve the above problems. Summary of the Invention
[0003] One or more embodiments of this specification provide a medical record management system and method based on OCR identity recognition, aiming to solve the above problems.
[0004] An embodiment of the present invention provides a medical record management system based on OCR identity recognition, including:
[0005] An identity recognition module, a medical record management module, and a display module;
[0006] The identity recognition module is used to recognize a user by identifying the user's certificate and obtain the user's personal information;
[0007] The medical record management module is used to receive the user's personal information and organize the user's personal information according to a preset organizational structure;
[0008] The display module is used to display the user's personal information organized according to the preset organizational structure.
[0009] An embodiment of the present invention provides a medical record management method based on OCR identity recognition, including:
[0010] The identity recognition module is used to recognize a user by using a preset OCR recognition method and a preset text confirmation method to identify the user's certificate and obtain the user's personal information;
[0011] Receive the user's personal information through the medical record management module, and organize the user's personal information according to a preset organizational structure;
[0012] Display the user's personal information organized according to the preset organizational structure through the display module.
[0013] By adopting the embodiment of the present invention, a solution combining a camera and an algorithm is used to achieve the function of extracting compatible ID card and social security card information, reducing the cost of upgrading the card reader. The method of collecting images through the camera belongs to non-contact identification, avoiding the problem of poor contact that may occur in traditional ID card readers. At the same time, the supplementary light device in the structure is used to be compatible with the quality of images collected in different scenarios, avoiding the problem that the image is too dark in a dim environment and affecting the recognition accuracy. By designing a fixed card slot, it is avoided that the image information is incomplete due to placement problems; through the image correction module, the direction analysis is automatically performed and the camera distortion is used for correction to improve the accuracy of OCR recognition. By using the text confirmation method to calculate the similarity using contour features, the accuracy of low-confidence prediction results is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in one or more embodiments of the present specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0015] Figure 1 Schematic diagram of a medical record management system based on OCR identity recognition according to an embodiment of the present invention;
[0016] Figure 2 Flowchart of a medical record management method based on OCR identity recognition according to an embodiment of the present invention;
[0017] Figure 3 Specific architecture schematic diagram of a medical record management system based on OCR identity recognition according to an embodiment of the present invention;
[0018] Figure 4 Schematic diagram of an auxiliary device of a medical record management system based on OCR identity recognition according to an embodiment of the present invention;
[0019] Figure 5 Structure diagram of an auxiliary device of a medical record management system based on OCR identity recognition according to an embodiment of the present invention;
[0020] Figure 6 Schematic diagram of the working process of an image correction module according to an embodiment of the present invention;
[0021] Figure 7 Schematic diagram of the OCR recognition sub-module according to an embodiment of the present invention;
[0022] Figure 8 Schematic diagram of the portable intelligent follow-up case of the integrated OCR identity recognition system according to an embodiment of the present invention;
[0023] Description of the drawings: 1 - Light source port; 2 - Card slot; 3 - Camera; 4 - Light source pressing plate; 5 - Light source; 6 - Light-shielding cover; 7 - Window; 8 - Fixed plate; 9 - Display screen; 10 - OCR identity recognition system; 11 - Box body. Detailed implementation manners
[0024] In order to enable those skilled in the art of this technology to better understand the technical solutions in one or more embodiments of this specification, the following will clearly and completely describe the technical solutions in one or more embodiments of this specification with reference to the accompanying drawings in one or more embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this document.
[0025] System embodiment
[0026] According to an embodiment of the present invention, a medical record management system based on OCR identity recognition is provided. Figure 1 Schematic diagram of the medical record management system based on OCR identity recognition according to an embodiment of the present invention. As shown in Figure 1 The medical record management system based on OCR identity recognition according to an embodiment of the present invention specifically includes:
[0027] An identity recognition module 10, a medical record management module 12, and a display module 14;
[0028] The identity recognition module 10 is used to identify a user by using a preset OCR recognition method and a preset text confirmation method to recognize the user's certificate, and obtain the user's personal information; Figure 3 Schematic diagram of the specific architecture of the medical record management system based on OCR identity recognition according to an embodiment of the present invention. It can be seen from Figure 3 that the identity recognition module 10 specifically includes:
[0029] An auxiliary device, an image acquisition module, an image correction module, and an OCR recognition sub-module;
[0030] The auxiliary device is used to fix the user's certificate; Figure 4 Schematic diagram of the auxiliary device of the medical record management system based on OCR identity recognition according to an embodiment of the present invention. The auxiliary device specifically includes:
[0031] Fixing device and supplementary lighting device;
[0032] The fixing device is a general-purpose card slot 2 for fixing the placement position of the certificate;
[0033] Figure 5 It is a structural diagram of an auxiliary device of a medical record management system based on OCR identity recognition according to an embodiment of the present invention. The supplementary lighting device includes a light source 5, a light source pressing plate 4, and a light-shielding cover 6 for supplementing light for the image acquisition device. The light source 5 is arranged in front of the image acquisition device. In the specific implementation of the present application, a camera 3 is used as the image acquisition device, which is fixed by the light source pressing plate 4. The light-shielding cover 6 is used to eliminate the light spots generated by the light source. A light source opening 1 is arranged above the light-shielding cover, and a viewing window is arranged in front of the light-shielding cover 6 and fixed by a fixing plate 8.
[0034] The image acquisition device is used to acquire an image of the fixed user certificate to obtain a certificate image;
[0035] The image correction module is used to correct the certificate image; Figure 6 It is a schematic diagram of the working process of the image correction module according to an embodiment of the present invention. The image correction module is specifically used for:
[0036] Using the template matching algorithm, judge the front and back directions of the certificate. If the certificate is placed backwards, give an error prompt; the front of the ID card and the social security card is personal information, and the common feature on the back is that there is a national emblem pattern. Here, the national emblem pattern is used as template 1. Through the template matching algorithm, judge whether there is a national emblem pattern in the current image. If there is a matching result, it is considered that the certificate is placed backwards, and an error prompt is given to prompt the user to place the certificate again; if there is no matching result, enter the next step of recognition;
[0037] Using the template matching algorithm, distinguish the types of certificates; the personal information on the front of the ID card and the social security card is different. Therefore, it is necessary to distinguish the social security card and the ID card before the recognition model and process them according to different methods. Compared with the front of the ID card, there is a yellow area, that is, a non-contact IC chip, on the front of the social security card. This chip area is used as template 2. Through the template matching algorithm, judge whether there is this chip area in the current image. If there is this area, then the certificate is a social security card; otherwise, this area is an ID card. In the subsequent processing, the ID card and the social security card are analyzed separately.
[0038] Perform correction for the inverted orientation of the certificate: If the certificate type is a social security card, determine whether it is inverted and correct it according to the relative position of the center of the chip area. According to the relative position of the center of the chip area in the template matching algorithm with respect to the card, determine whether there is a problem of up-down inversion in the social security card image. If the chip is located in the right half when the social security card is in the correct orientation, then if the chip is detected to be in the left half, it is considered that the text direction in the current image certificate is reversed, and the text direction is made positive through a flipping operation; if the certificate type is an ID card, use a face recognition model based on Haar features to locate the position of the portrait in the certificate. The position of the ID card portrait is generally on the right side of the picture. If the portrait is on the left side of the image, it means that the ID card is upside down at this time and the text direction is reversed, and correction is required through a flipping operation.
[0039] Camera distortion correction: Obtain the distortion coefficients by photographing a calibration object with a known shape (such as a checkerboard). Use the calibration functions in a computer vision library (such as OpenCV), input the image of the calibration object taken, and these functions will calculate the distortion coefficients of the camera according to the actual geometric shape of the calibration object in the image and its deformation in the image. According to the distortion coefficients calculated previously, remap each pixel point in the image to obtain the corrected image.
[0040] The OCR recognition sub-module is used to recognize the corrected certificate image and extract the user's personal information. Figure 7 It is a schematic diagram of the OCR recognition sub-module of the embodiment of the present invention. The OCR recognition sub-module is specifically used for:
[0041] Keyword positioning: Based on the preset precise row and column interval parameters, extract the key information sub-images from the corrected document image and perform dynamic threshold binarization processing. Since the information arrangement of ID cards or social security cards is fixed, detailed and precise row and column interval parameters are preset within the system. These parameters clearly define the specific position ranges where each piece of key information is located on the document image. For example, for an ID card, the row interval where the "name" information is located may be from the 70th to the 120th pixel row from the top of the image, and the column interval is from the 50th to the 350th pixel column from the left. The row interval corresponding to the "citizen identification number" is approximately from the 130th to the 230th pixel row from the bottom of the image, and the column interval is from the 50th to the 900th pixel column from the left. For a social security card, there are also precise row and column coordinate range settings for each key information such as the "cardholder's name" and "social security number". According to the above preset row and column intervals, from the corrected original document image, through precise pixel-level cropping operations, the image areas corresponding to each piece of key information are separately extracted to form individual sub-images. Perform dynamic threshold binarization processing on each sub-image, and adaptively determine the appropriate threshold according to the pixel gray distribution characteristics of different regions in the sub-image. Effectively highlight the text part, making its edges clearer and the contours more distinct.
[0042] Text cutting: Perform a vertical projection on the binarized sub-image, identify the text boundaries according to the pixel number curve, cut out individual characters, and adjust the character images to a unified size. Cut each sub-image to separate individual characters. Since there are obvious boundaries between each text on the card surface and the context association of information such as the name is not very sensitive, the sub-image is cut into individual texts for separate recognition here. Perform a vertical projection on the binarized sub-image and count the number of valid pixels in each column. According to the pixel number curve, identify the left and right boundaries of the column text where the number of valid pixels is closest to 0 to achieve the cutting of individual characters. And adjust each character image to a unified size (32*32).
[0043] OCR recognition is used to input the binarized sub - images into a trained OCR recognition model. The trained OCR recognition model analyzes each character one by one, compares the features of each text region, and outputs the top three prediction results with the highest confidence. Specifically, for each divided text region, its morphological features are further analyzed in depth, and these features are compared and matched with various standard morphological features of characters memorized by the model. Each character obtains the top three prediction results with the highest confidence. If the highest confidence is greater than a preset threshold (e.g., 0.9), it is considered that the result has a high confidence and can be directly output (e.g., if the confidences of the top three prediction results are 0.95, 0.03, 0.02, then the prediction result corresponding to 0.95 can be directly output); otherwise, these three prediction results are used as candidates to enter the next step of text confirmation (e.g., if the top three prediction results are 0.4, 0.35, 0.25, then text confirmation is required).
[0044] Text confirmation is to confirm the final output through contour similarity matching for the prediction results with low confidence. First, binarized simulated text images of the top three candidate results are generated according to a preset font (e.g., the standard font of an ID card), with the same size as each character image. Edge detection algorithms are used to extract the contour features of the text to be measured and the simulated text. Based on the Hausdorff distance, the similarity between the text to be measured and each candidate result is calculated, and the candidate with the highest similarity is the final output result.
[0045] Text format layout is used to organize and arrange the extracted text information according to a predefined text format. After the text information in the sub - images is completely extracted, it is organized and arranged according to the predefined text format. For example, the text information extracted from the "Name" sub - image on the ID card will be arranged in a corresponding string format from left to right, and the numbers in the "Citizen ID Number" sub - image will be presented in the form of a continuous number string. Finally, the text information corresponding to all sub - images is converted into a standardized text format, providing accurate and reliable data support for subsequent keyword positioning, text information extraction, and the information integration and utilization of the entire system.
[0046] The medical record management module 12 is used to receive the user's personal information and organize it according to a preset organizational structure; receive the personal information identified by the identity recognition module, and accurately fill the identity information into the corresponding fields according to the semantic and format requirements of each field in the case template. After filling, multiple - round verifications are immediately triggered. The first round is format verification, checking whether the ID number is 18 - digit compliant, whether the date format is correct, etc.; the second round is associated verification, comparing the logical consistency between the gender and the 17th digit of the ID number. Ensure the efficient and error - free creation of cases, achieve a smooth connection from identity recognition to medical record filing, and optimize the data management process.
[0047] The medical record management module 12 is also used to fill the user's personal information obtained by the identity recognition module into the corresponding fields according to the semantic and format requirements of each field in the case template, and trigger multi-round verification after filling.
[0048] The display module 14 is used to display the user's personal information sorted according to the preset organizational structure. The display module is a touchable display screen.
[0049] The medical record management system based on OCR identity recognition further includes: a data integration module, which is used to fill physiological data from multiple sources and different types into the corresponding fields of the medical record management module according to the established medical data specifications and data structures. The physiological data is automatically uploaded to the system instantaneously when it is generated by the physiological signal acquisition device through wireless transmission technology. The wireless transmission technology supports multiple stable and high-speed transmission protocols such as Bluetooth and Wi-Fi to ensure the timeliness and integrity of data transmission.
[0050] Figure 8 This is a schematic diagram of a portable intelligent follow-up case with an integrated OCR identity recognition system according to an embodiment of the present invention. The display screen 10 is a touchable Android tablet for user interaction. An OCR identity recognition system 11 is built in. A variety of physiological signal acquisition devices, such as a thermometer gun, an electronic sphygmomanometer, a blood glucose meter, a pulse oximeter, etc., can be placed inside the follow-up case body 12. When the user uses the follow-up case, first insert the subject's ID card or social security card into the card slot on the right side of the follow-up case for OCR identity recognition. If there is no data of the subject in the system, a new medical record will be automatically created. Use the physiological signal acquisition devices in the follow-up case to collect the subject's physiological data. The moment each piece of physiological data is generated at the acquisition device end, it will be automatically uploaded to the system by means of wireless transmission technology (supporting multiple stable and high-speed transmission protocols such as Bluetooth and Wi-Fi to ensure the timeliness and integrity of data transmission). The built-in data integration module in the system fills these physiological data from multiple sources and different types (numerical type, waveform type, etc.) into the corresponding field positions in the report form according to the established medical data specifications and data structures. This report form can be directly displayed on the display screen of the follow-up case for medical staff to view and interpret for the subject on site; it can also be synchronized to the cloud with one key, facilitating other department experts in the medical institution to consult and refer to it during remote consultations, truly realizing the full process automation and intelligence from identity recognition, data collection to the issuance of diagnostic reports, effectively improving the convenience, accuracy and coordination of medical services.
[0051] By adopting the embodiment of the present invention, the following beneficial effects are achieved:
[0052] Through the combination of the camera and the algorithm, the function of extracting ID card and social security card information is realized, and the cost of upgrading the card reader is reduced to a certain extent.
[0053] The method of collecting images through a camera belongs to non-contact identification, avoiding the problem of poor contact that may occur in traditional ID card readers. At the same time, through the fill light device in the structure, the quality of image collection is less affected by the external environment.
[0054] In terms of structure, a fixed card slot is designed to avoid incomplete image information caused by placement problems; through the fill light device, the quality of images collected in different scenarios is compatible, avoiding the problem that the image is too dark in a dim environment and affecting the recognition accuracy. Before OCR recognition, if there is a problem with the wrong placement direction of the image, the image correction module automatically performs direction analysis and correction. At the same time, camera distortion is also corrected to improve the accuracy of OCR recognition.
[0055] The OCR recognition module outputs the top three candidate results with confidence for each character. If the confidence levels of the candidate results are close, character confirmation is performed. Through the Hausdorff distance for contour similarity matching (internal details of characters with more strokes are prone to loss, but the outer contours are generally accurate), the candidate with the highest similarity is taken as the final output result.
[0056] Method embodiment
[0057] According to an embodiment of the present invention, a medical record management method based on OCR identity recognition is provided. Figure 2 This is a flowchart of the medical record management method based on OCR identity recognition according to an embodiment of the present invention. According to Figure 2 as shown, the medical record management method based on OCR identity recognition according to an embodiment of the present invention specifically includes:
[0058] S1. Use the identity recognition module to identify the user by identifying the user's certificate and obtain the user's personal information;
[0059] S2. Receive the user's personal information through the medical record management module and organize the user's personal information according to a preset organizational structure;
[0060] S3. Display the user's personal information organized according to the preset organizational structure through the display module.
[0061] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A medical record management system based on OCR identity recognition, characterized in that Including: An identity recognition module, a medical record management module, and a display module; The identity recognition module is used to recognize the user by using a preset OCR recognition method and a preset text confirmation method to recognize the user's certificate, and obtain the user's personal information; The medical record management module is used to receive the user's personal information and organize the user's personal information according to a preset organizational structure; The display module is used to display the user's personal information organized according to the preset organizational structure.
2. The system according to claim 1, wherein The identity recognition module specifically includes: An auxiliary device, an image acquisition module, an image correction module, and an OCR recognition sub-module; The auxiliary device is used to fix the user's certificate; The image acquisition device is used to acquire an image of the fixed user's certificate to obtain a certificate image; The image correction module is used to correct the certificate image; The OCR recognition sub-module is used to recognize the corrected certificate image by using a preset OCR recognition method and a text confirmation method, and extract the user's personal information.
3. The system according to claim 2, wherein The auxiliary device specifically includes: A fixing device and a supplementary light device; The fixing device is a general-purpose card slot for fixing the placement position of the certificate; The supplementary light device includes a light source, a light source pressing plate, and a light-shielding cover, and is used to supplement light for the image acquisition device. The light source is arranged in front of the image acquisition device, fixed by the light source pressing plate, and the light spot generated by the light source is eliminated by the light-shielding cover.
4. The system according to claim 2, wherein The image correction module is specifically used for: Using a template matching algorithm to judge the front and back directions of the certificate. If the certificate is placed backwards, an error prompt is given; Using a template matching algorithm to distinguish the certificate type; If the certificate type is a social security card, judge whether it is inverted and correct it according to the relative position of the chip area center; if the certificate type is an ID card, use a face recognition model based on Haar features to locate the avatar position and judge whether it is inverted and correct it; Obtain the distortion coefficient by photographing a calibration object with a known shape, calculate the distortion coefficient for the calibration object image by using a computer vision library, and remap the image pixel points to correct the camera distortion.
5. The system according to claim 2, wherein The OCR recognition sub-module is specifically used for: Keyword positioning, extracting a key information sub-graph from the corrected certificate image according to preset accurate row and column interval parameters, and performing dynamic threshold binaryzation processing; Text cutting, performing vertical projection on the binaryzation sub-graph, identifying the text boundary according to the pixel number curve, cutting out individual characters, and adjusting the character images to a unified size; Inputting the binaryzation sub-graph into a trained OCR recognition model by using a preset OCR recognition method. The trained OCR recognition model analyzes each character one by one, compares the features of each text area, and outputs the three prediction results with the highest confidence; Using a preset text confirmation method for the prediction results with a confidence lower than the preset threshold, generating a simulated text image according to the preset font, extracting the contour features of the text to be measured and the simulated text, calculating the similarity based on the Hausdorff distance, and outputting the candidate result with the highest similarity; Text format layout, used to organize and layout the extracted text information according to the established text format.
6. The system according to claim 1, wherein The medical record management module is further configured to fill the user's personal information obtained by the identity recognition module into the corresponding fields according to the semantic and format requirements of each field of the case template, and trigger multiple rounds of verification after filling.
7. The system according to claim 1, wherein The medical record management system based on OCR identity recognition further includes: a data integration module, which is used to fill the physiological data from multiple sources and different types into the corresponding fields of the medical record management module according to the established medical data specifications and data structures.
8. The system according to claim 7, wherein The physiological data is automatically uploaded to the system at the moment when the physiological signal acquisition device generates data through wireless transmission technology. The wireless transmission technology supports multiple stable and high-speed transmission protocols such as Bluetooth and Wi-Fi to ensure the timeliness and integrity of data transmission.
9. The system according to claim 1, wherein The display module is a touchable display screen.
10. A medical record management method based on OCR identity recognition, characterized in that, Applied to the medical record management system based on OCR identity recognition according to any one of claims 1-9, including: The identity recognition module is used to identify the user by identifying the user's certificate and obtain the user's personal information; The medical record management module receives the user's personal information and organizes the user's personal information according to a preset organizational structure; The display module displays the user's personal information organized according to the preset organizational structure.