An ai-based medical insurance service matter process management method and system

By processing the stamp image and recognizing the text on the double-page paper prescription slip, the difficulty of automatic classification caused by broken stamps was solved, and efficient and automated management of medical insurance service items was achieved.

CN122493471APending Publication Date: 2026-07-31YILIANZHONG MINSHENG (XIAMEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YILIANZHONG MINSHENG (XIAMEN) TECH CO LTD
Filing Date
2026-06-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In the field of medical insurance services, the stamps on paper prescription slips are difficult to recognize due to the cutting across pages and the seams, which affects the accuracy of automatic classification of application materials for chronic and special diseases and the efficiency of the process.

Method used

By acquiring prescription sheet images, identifying headings and patient information, detecting seals and aligning them across pages, a complete seal image is formed. The text distribution is extracted, regions of interest are delineated, text line detection and semantic classification are performed, and the departmental affiliation is assessed in conjunction with the chronic and special disease catalog. The confidence level of disease classification is calculated, and supplementary evidence is provided when necessary to ultimately determine a stable classification of prescription sheets.

Benefits of technology

It enables accurate department and disease classification even when the stamp is broken across multiple pages, improving the accuracy and efficiency of automated workflow and solving the problems of low stamp recognition rate and inaccurate information classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493471A_ABST
    Figure CN122493471A_ABST
Patent Text Reader

Abstract

This application provides an AI-based method and system for managing medical insurance service processes, including: extracting the distribution of institutional and business text from a complete seal image, determining the layout of department seal text, and defining regions of interest (ROIs) based on the text outlines and seal structure; optimizing the updated ROI boundaries based on text connectivity and layout density; performing text line detection and semantic classification within the updated ROI boundaries to identify department names, outpatient category identifiers, and specialty locations; obtaining a directory of chronic and special disease departments maintained by the medical insurance agency, matching department text, outpatient text, and specialty text with directory department keywords, and evaluating department affiliation based on the location of department keywords within the seal area to obtain department affiliation labels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to an AI-based method and system for managing medical insurance service processes. Background Technology

[0002] In the field of medical insurance services, the automatic classification and processing of chronic and special disease application materials is directly related to whether patients can receive timely medical security support. In primary healthcare institutions and some designated hospitals that have not yet completed electronic upgrades, the qualification for chronic and special diseases still requires the submission of paper prescriptions stamped with the original department seal as legal proof of application. Because the original seal has irreplaceable identity verification power and cannot be replaced by electronic documents, the need for automatic classification and processing of such paper prescriptions remains. Currently, many automatic classification methods often experience judgment errors when processing such paper materials due to the varied positions of the seals, leading to materials being incorrectly sorted or entering the manual review channel, increasing workload and delaying the patient application process. The seal on the prescription should provide clear department and disease information to help the system accurately determine the category of the material. However, when patients with chronic and special diseases have complex conditions and numerous medications, resulting in prescriptions spanning multiple pages, the administrators, following anti-tampering guidelines, affix a seal across the seam of adjacent pages to prevent page replacement. In this case, the same seal is split across different pages, rendering the originally complete seal image incomplete on a single page. This segmentation not only makes the seal's header difficult to fully identify but also directly affects the extraction location of surrounding keywords. In actual application processes, when patients simultaneously suffer from multiple chronic and special diseases such as hypertension and diabetes, and the prescription medication list spans two pages, the first page may only display half the edge of the seal, while the second page shows the other half. If the fixed area division standard set for a complete single-page seal is used to divide the reading area, the crucial department text will be split into different blocks, making it impossible to effectively link the originally related disease tags. Therefore, how to accurately obtain the coordinates of the seal and the splicing relationship across pages when the seal is cut across the page, dynamically adjust the boundary of the page area division and stably extract departmental keywords, so as to achieve reliable automatic classification of chronic and special disease application materials, has become a key issue in the process management of medical insurance service items. Summary of the Invention

[0003] This invention provides an AI-based method for managing medical insurance service processes, mainly including: The process involves acquiring the prescription image and page number sequence, identifying the prescription header and patient information section, detecting the medical institution's seal at the header, aligning the seal across pages according to the seam allowance, and forming a complete seal image. From this complete seal image, the distribution of institutional and business-related text is extracted, and the region of interest (ROI) is defined based on the text's outer contour and the seal's structural range, resulting in an updated ROI boundary. Within the updated ROI boundary, text line detection and semantic classification are performed to identify the department name, outpatient category identifier, and specialty location. Finally, the chronic disease department directory maintained by the medical insurance agency is obtained, and the department text, outpatient text, and specialty text are matched against the directory's key department information. The system analyzes and evaluates departmental affiliation by combining the location of departmental keywords within the stamp area, resulting in departmental affiliation labels. It then obtains the reimbursement range for chronic and special diseases configured by the medical insurance agency, maps the departmental affiliation labels to the corresponding disease sets, and calculates the initial disease classification confidence level. If the initial disease classification confidence level does not meet the preset classification requirements, it supplements disease evidence and updates it to the final disease classification confidence level. Finally, it obtains the classification threshold and automatic transfer path for chronic and special disease application materials configured by the medical insurance agency, determines a stable classification prescription based on the final disease classification confidence level and the classification threshold, and inputs the stable classification prescription into the automatic transfer path.

[0004] Furthermore, the steps of acquiring the prescription image and page number sequence, identifying the prescription header and patient information column, and detecting the medical institution's seal at the header include: performing layout analysis on the prescription image, identifying the prescription header area and patient information column located at the top of the paper, and locating the right or bottom edge of the paper; using Hough line detection to obtain the direction of the paper border and the baseline direction of the text in the prescription image, performing rotation and tilt correction on the prescription image based on the angle between the paper border and the text baseline to obtain a prescription image with corrected orientation; extracting the red imprint component from the prescription image with corrected orientation through color channel separation, and performing connected component detection on the red imprint component in the prescription header area to obtain the coordinates of the header seal on the current page.

[0005] Furthermore, the step of aligning pages across the seam to form a complete stamp image includes: pairing two pages according to the order of adjacent page numbers; horizontally aligning the seam edges of the two pages according to the direction of the stamp marks to obtain seam cross-page information; determining the splicing reference point based on the geometric position of the page edges of adjacent pages and the spatial overlap area of ​​the red stamp on both sides of the seam; using a scale-invariant feature transformation algorithm to match and spatially register the texture features of the stamp fragments around the splicing reference point; and fusing the registered red stamp area along the seam line to obtain the complete stamp image.

[0006] Furthermore, the step of defining the region of interest (ROI) based on the bounding contour of the text and the range of the seal structure to obtain the updated ROI boundary includes: using red channel binarization and text contour detection to identify the text pixels within the complete seal image; obtaining the distribution coordinates of institutional and business text based on the relative relationship between the pixel positions and the seal center coordinates; extracting the minimum bounding rectangle contour for each text segment; classifying and aggregating them according to institutional and business levels to form a rectangular bounding box; shrinking the edge of the rectangular bounding box towards the inside of the seal structure to define the initial ROI region; performing eight-neighbor connected component detection on the red text pixels within the initial ROI region; and shrinking or expanding the edge according to the direction of the text arrangement density gradient to obtain the updated ROI boundary.

[0007] Furthermore, within the updated segmentation boundary of interest, text line detection and semantic classification are performed to identify the department name, outpatient category identifier, and specialty location, respectively. This includes: performing horizontal projection and character connected region merging on the red text pixels within the updated segmentation boundary of interest; merging adjacent text pixels according to character spacing and baseline direction to obtain text line detection results with start and end coordinates; using a recurrent neural network to perform optical character recognition on each line of text images in the text line detection results, outputting the character sequence of each line; and identifying the department name at the center of the stamp, the outpatient category identifier in the upper and lower areas, and the specialty location at the ring edge based on the semantics of the character sequence.

[0008] Furthermore, after obtaining the updated segmentation boundary of interest, the process includes: loading the chronic disease and special disease department directory maintained by the medical insurance agency, which covers the names of departments involved in the identification of chronic diseases and special diseases; performing longest substring matching on the character sequence within the updated segmentation boundary of interest and the directory entries in the chronic disease and special disease department directory to obtain the department keywords that match the directory entries and the pixel coordinates of the department keywords in the stamp image; calculating the polar radius from the geometric centroid of the bounding box of the department keyword text to the center coordinates of the stamp based on the pixel coordinates of the department keywords in the stamp image and the center coordinates of the stamp, and determining the... The text arrangement of department keywords is as follows: if the extreme diameter is lower than the preset inner circle extreme diameter threshold and the text is arranged horizontally, it is determined to be a center-position horizontal arrangement; if the extreme diameter is higher than the preset outer circle extreme diameter threshold and the text is arranged in an arc along the circumference, it is determined to be a ring-shaped arc arrangement; if the arrangement is a center-position horizontal arrangement, the department keyword is classified into the inner circle department level of the seal; if the arrangement is a ring-shaped arc arrangement, the department keyword is classified into the outer circle organization level; a level attribution field is added to the department keyword, and a department attribution label composed of the department keyword, the level to which it belongs, and the corresponding seal center coordinates is output.

[0009] Furthermore, the process of matching department text, outpatient text, and specialty text with the keywords of the directory department, and combining the position of the department keywords within the stamp area to evaluate department affiliation and obtain a department affiliation label, includes: performing string matching on each of the identified department name text, outpatient category identifier text, and specialty location identifier text with the department keywords in the chronic and special disease department directory, recording the matching keywords and matching position coordinates for each type of text, and obtaining a set of matching keywords; evaluating the affiliation of each matching keyword based on its position within the stamp, if it is located in the horizontal position of the center of the stamp, it is classified as a department level, and if it is located on the outer edge of the ring, it is classified as an institution level; and summarizing to obtain the department affiliation label composed of the matching keywords, the level to which it belongs, and the center coordinates of the stamp.

[0010] Furthermore, the step of mapping the department affiliation tags to the corresponding disease sets and calculating the initial disease classification confidence score includes: obtaining a correspondence table between department keywords and disease sets within the scope of chronic and special disease reimbursement diseases, as well as the standard description text of each disease; performing a lookup match on the correspondence table for the matched keywords in the department affiliation tags to obtain the disease set mapped by the matched keywords; and for each disease in the disease set, matching the matched keywords with the corresponding levels in the department affiliation tags. The string matching similarity of the relation table entries is used to assign a classification score from the department's seal to each disease. The classification score is then normalized to the range of 0 to 1 based on the maximum value to obtain the initial disease classification confidence of each disease in the disease set. The initial disease classification confidence of each disease is compared with the classification threshold. If the initial disease classification confidence reaches the classification threshold, then the initial disease classification confidence is used as the final disease classification confidence of that disease. If it does not reach the classification threshold, then the disease is retained as a disease to be supplemented.

[0011] Furthermore, the supplementary disease evidence, updated to the final disease classification confidence level, includes: retaining diseases that do not meet the classification threshold as diseases to be supplemented; extracting prescription text evidence sets for the diseases to be supplemented from the full text of the prescription; generating text vectors for each type of text in the prescription text evidence set using a pre-trained word embedding vectorization method; generating reference vectors for the pre-stored standard description texts of the diseases to be supplemented; performing semantic similarity comparison between the text vectors and the reference vectors using cosine similarity to obtain a similarity score for each type of text to the disease to be supplemented; weighting and summing the similarity scores according to preset weights to form a disease evidence increment; and adding the disease evidence increment to the initial disease classification confidence level of the diseases to be supplemented to update the final disease classification confidence level of the diseases to be supplemented.

[0012] Furthermore, the step of determining stable classification prescriptions based on the final disease classification confidence level and the classification threshold, and inputting the stable classification prescriptions into the automatic transfer path, includes: comparing the final disease classification confidence level with the classification threshold; if the final disease classification confidence level is higher than the classification threshold, then marking the prescription corresponding to the disease as a stable classification prescription, thus obtaining a set of stable classification prescriptions; matching the target transfer node in the automatic transfer path for chronic and special disease application materials according to the disease corresponding to each prescription in the set of stable classification prescriptions, and delivering the stable classification prescriptions to the automatic transfer path according to the direction of the target transfer node.

[0013] This invention provides an AI-based medical insurance service process management system, which mainly includes: The prescription image processing module is used to acquire prescription images and page number order, identify the prescription header and patient information column, detect the medical institution's seal at the header, complete cross-page alignment according to the seal seam, and form a complete seal image. The region of interest delineation module is used to extract the distribution of organizational and business text from the complete seal image, delineate the region of interest according to the outer contour of the text and the range of the seal structure, and obtain the updated region of interest boundary. The text recognition and classification module is used to perform text line detection and semantic classification within the updated segmentation boundary of interest, respectively recognizing the department name, outpatient category identifier and specialty location; The department affiliation assessment module is used to obtain the directory of chronic and special disease departments maintained by the medical insurance agency, match the department text, outpatient text, and specialist text with the directory department keywords, and combine the position of the department keywords in the stamp area to conduct department affiliation assessment and obtain the department affiliation label. The disease classification assessment module is used to obtain the scope of chronic and special disease reimbursement diseases configured by the medical insurance agency, map the department affiliation label to the corresponding disease set, and calculate the initial disease classification confidence. If the initial disease classification confidence does not meet the preset classification requirements, disease evidence is supplemented and updated to the final disease classification confidence. The automated circulation management module is used to obtain the classification threshold and automatic circulation path of chronic and special disease application materials configured by the medical insurance agency, determine the stable classification prescription based on the final disease classification confidence level and the classification threshold, and input the stable classification prescription into the automatic circulation path.

[0014] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses an AI-based method for managing medical insurance service processes. It addresses the problem of broken seals across pages of prescriptions for chronic and special diseases, leading to difficulty in information recognition and hindering accurate disease classification based solely on the seal, thus impacting automated workflow. This invention generates a complete seal image by spatially registering and pixel-level fusion of multi-page seal fragments. It optimizes segmentation boundaries to accurately extract departmental text, combines the chronic and special disease catalog with text position to determine departmental affiliation, and calculates initial disease classification confidence. When confidence is insufficient, it extracts semantic features such as diagnoses and medications from the full text to supplement evidence and update the confidence. Finally, it achieves automatic prescription workflow based on thresholds. This invention effectively solves the problems of low recognition rate of broken seals and inaccurate classification of single information, improving disease classification accuracy and achieving efficient automated management of medical insurance services. Attached Figure Description

[0015] Figure 1 This is a flowchart of an AI-based medical insurance service process management method according to the present invention.

[0016] Figure 2 This is a schematic diagram of an AI-based medical insurance service process management method according to the present invention.

[0017] Figure 3 This is another schematic diagram of an AI-based medical insurance service process management method according to the present invention.

[0018] Figure 4 This is a schematic diagram of the structure of an AI-based medical insurance service process management system according to the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0020] like Figures 1-4 This embodiment of an AI-based medical insurance service item process management method may specifically include: S101. Obtain the prescription image and page number sequence, identify the prescription header and patient information column, locate the page edge seam area, detect the medical institution's seal at the header, correct the page orientation, and complete the page crossover by following the seam seam imprint and cutting line, obtain the header seal coordinates and seam crossover information, and verify the integrity of the presentation to form a complete seal image.

[0021] The prescription document scan image and corresponding page number sequence are obtained. The prescription document image is then parsed to identify the prescription header area at the top of the page and the patient information field containing name, gender, medical card number, and age. The right or bottom edge of the page is located. Hough line detection is used to obtain the direction of the page border and the baseline direction of the text in the prescription document image. The angles between the page border direction and the horizontal direction, and between the text baseline direction and the horizontal direction, are calculated. The weights of the page border angle and the text baseline angle are set to 0.4 and 0.6, respectively. The weighted average of these two values ​​is taken as the overall deflection angle. Based on this overall deflection angle, rotation and tilt correction is performed on the prescription document image to obtain the corrected prescription document image and the coordinate ranges of the edge area and the header area. The red imprint component is extracted from the orientation-corrected prescription image by color channel separation. Connectivity detection is performed on the red imprint component within the prescription header area to obtain the initial circumscribed region formed by the red pixel clusters of the medical institution's seal, thus obtaining the coordinates of the header seal on the current page. The two pages are paired according to the adjacent page number order, and the direction of the seam markings, the position of the cutting line, and the extension direction of the red imprints are compared within the seam area of ​​the two pages. The seam edges of the two pages are horizontally spliced ​​and aligned according to the direction of the imprints, and it is determined whether the header seal spans the seam of the adjacent page to obtain the coordinates of the header seal and the seam spanning information. The integrity of the header stamp on the current page is verified based on the cross-page information. If the header stamp only shows a partial arc outline or incomplete text, it is determined to be a broken stamp cut across the seam. The splicing reference point is determined based on the geometric position of the page edges of adjacent pages and the spatial overlap area of ​​the red imprint on both sides of the seam. The scale-invariant feature transformation algorithm is used to match and spatially register the texture features of the stamp fragments around the splicing reference point. The red imprint area of ​​the registered adjacent pages is subjected to pixel-level weighted fusion along the seam line to obtain a complete stamp image and the corresponding stamp center coordinates.

[0022] This implementation method is applied to the pre-processing stage of automatic classification of paper prescriptions in chronic and special disease application materials by medical insurance agencies.

[0023] In one possible implementation, staff at designated medical institutions use a document scanner or flatbed scanner to collect paper prescriptions stamped with the department's original seal page by page, generating scanned images of the prescriptions. Each page is then assigned an incremental page number according to the physical order in which the paper prescriptions were bound, and the page number sequence is bound to the scanned images through file naming or metadata fields.

[0024] Specifically, when performing layout analysis on the scanned image of the prescription sheet, a layout segmentation method based on the text line projection histogram is adopted, dividing the entire prescription sheet image vertically into four horizontal strips: a header strip, a patient information strip, a diagnosis and prescription text strip, and a signature strip. The header strip, located at the top of the page, typically occupies 15% to 20% of the image height and contains the horizontal bold text of the medical institution's name and the red pixel distribution of the medical institution's seal. The patient information section is located immediately below the header strip, and when identifying the embedded name, gender, medical card number, and age fields, the fixed relative positions of the resident field labels are used for field anchoring. The positioning of the margin area depends on the physical binding characteristics of the prescription sheet.

[0025] In one embodiment, for A5 prescription paper, the seam area is defined as a longitudinal or transverse strip about 3 to 5 millimeters wide on the right or bottom side of the paper from the edge of the paper, and the strip typically shows a red imprint extending from the current page to the adjacent page as a cut-off mark.

[0026] It should be noted that image rotation and tilt caused by uneven placement or binding displacement during the scanning process need to be corrected in advance.

[0027] Preferably, Hough line detection is used to extract straight line features from the scanned prescription image, obtaining long straight line segments corresponding to the paper border and short horizontal straight line segments corresponding to the text baseline within the text area. The angles between the paper border direction and the horizontal direction, and the angles between the text baseline direction and the horizontal direction are calculated. The weighted average of these two angles is taken as the overall deflection angle. Based on this deflection angle, an affine rotation is performed on the scanned prescription image to obtain a prescription image with corrected orientation. In the prescription image with corrected orientation, the coordinate ranges of the heading area and the seam area are recorded in the form of rectangular vertex pixel coordinates and passed to subsequent processing steps.

[0028] It is understandable that the color imprint of the original seal of a medical institution's department exhibits a high response in the red channel and a low response in the green and blue channels in the RGB color space. In one implementation, color channel separation is performed on the orientation-corrected prescription image to extract the red imprint component. The specific process involves comparing the R, G, and B channel values ​​of each pixel. If the difference between the R channel value and the G channel value exceeds a preset red significance threshold of 50, and the difference between the R channel value and the B channel value also exceeds this threshold of 50, then the original R channel value of that pixel is retained and extracted as the red imprint component. The R channel values ​​of the remaining pixels that do not meet the conditions are uniformly set to 0 as the background.

[0029] For example, within the coordinate range of the header area, eight-neighbor connected component detection is performed on the red imprint pixels, aggregating adjacent red pixels into several connected components. Scattered noise connected components with an area smaller than a preset minimum stamp area threshold are filtered out. The largest remaining connected component corresponds to the red pixel cluster block of the medical institution's stamp. Its minimum bounding rectangle is calculated as the initial bounding region. The pixel coordinates of the upper left and lower right vertices of the initial bounding region together constitute the header stamp coordinates on the current page.

[0030] Specifically, the cross-page alignment process pairs adjacent pages according to their page number order.

[0031] For example, for pages N and N+1, the extended red imprint strips within the margin area of ​​both pages are extracted. The outline direction and endpoint positions of the red pixels at the margin are compared, and then the horizontal or vertical position of the physical cutting line of the paper is compared. When the deviation between the endpoint pixel of the red imprint strip on page N and the starting pixel of the red imprint strip on page N+1 in the vertical margin direction is less than the preset margin imprint registration tolerance, the margin edges of pages N and N+1 are horizontally aligned along the imprint direction, so that the red imprints of the two margin strips are connected end to end to form a continuous arc. Based on this, if the initial circumscribed area corresponding to the header stamp coordinates spans the margin of adjacent pages, the header stamp is recorded as having a cross-page distribution, and the margin cross-page information is output. The margin cross-page information includes the cross-page page number pair, the local coordinates of the stamp fragments on each page, and the pixel position of the margin seam line. Further, the integrity of the header stamp on the current page is verified based on the margin cross-page information. In one implementation, integrity verification is performed by comparing the arc closure of the red pixel clusters of the stamp on the current page with the integrity of the text layout: if the red pixel distribution of the stamp fragments only presents an arc outline on one side of the circumscribed rectangle while the other side is cut off by the straight edge across the seam, or if the text of the medical institution's name within the stamp shows obvious text defects, then the stamp is determined to be a stamp with a seam cut and broken. For stamps with seam cut and broken, the process proceeds to the page splicing stage.

[0032] Specifically, a coarse alignment reference is first determined based on the geometric position of the margins of adjacent pages. This involves aligning the seam edges of two adjacent pages at the pixel level, merging the coordinate systems of the two pages into a unified cross-page coordinate system. Then, within this cross-page coordinate system, the spatial overlap area of ​​the red imprint on both sides of the seam is located. This spatial overlap area refers to a narrow band where the red pixels of the two stamp fragments overlap or are adjacent to each other as they extend towards the seam near the seam line. The geometric center of this narrow band is selected as the splicing reference point. Within the local texture region surrounding the splicing reference point, a scale-invariant feature transformation algorithm is used to extract key point feature descriptors for each of the two adjacent pages of stamp fragments. The key point feature descriptors record the direction histogram of the image gradient around the key point. The key point feature descriptors of the two pages are matched according to the nearest neighbor Euclidean distance. Mismatched point pairs with a distance ratio exceeding a preset matching screening threshold are eliminated, and stable matching point pairs are retained. The planar affine transformation matrix between the two adjacent pages of stamp fragments is solved based on the stable matching point pairs. The N+1 page of stamp fragments is spatially registered based on the planar affine transformation matrix to ensure that it is strictly aligned with the Nth page of stamp fragments in the cross-page coordinate system.

[0033] Preferably, pixel-level weighted fusion is performed on the red imprint areas of two adjacent pages after registration along the seam line.

[0034] In one embodiment, the fusion weights are assigned linearly and gradually using the vertical distance from the pixel to the seam line as the variable. Pixels far from the seam line use the original red pixel value of the current page, while pixels close to the seam line use the weighted sum of the red pixel values ​​of the two pages. The fusion formula is P=w1*P1+w2*P2, where P represents the red channel value of the merged pixel, P1 and P2 represent the red channel values ​​of the Nth page and the (N+1)th page at the pixel position, respectively, and w1 and w2 are the fusion weights of the two pages and satisfy w1+w2=1.

[0035] In one possible implementation, a morphological closing operation is performed on the fused red imprint to fill in the tiny pixel holes, resulting in a complete seal image. Then, the geometric centroid of the complete seal image is calculated, and the corresponding seal center coordinates are output. The complete seal image and the seal center coordinates serve as input data for subsequent seal layout area division and department keyword extraction.

[0036] It should be noted that this implementation method is also applicable to application scenarios where patients suffer from hypertension and diabetes and are involved in multiple chronic and special disease medications, and the prescription content spans two or three pages. In the case of three pages spanning multiple pages, the above splicing process is performed on adjacent pages one by one in page number order until all seal fragments are merged into a complete seal image, thereby providing a stable seal imaging basis for the automatic classification of chronic and special disease application materials.

[0037] S102. Extract the distribution of organizational and business text from the complete seal image, determine the position of the department seal text, and delineate the region of interest based on the text outline and the seal structure range. Based on the text connectivity and arrangement density optimization, obtain the updated region of interest boundary.

[0038] Based on the complete seal image and the seal center coordinates, red channel binarization and text contour detection are used to identify the text pixels within the seal. The text arrangement is differentiated based on the relative relationship between pixel positions and the seal center coordinates. Horizontal text located in the center of the seal is categorized as department names within the institutional text category; text arranged in a circular arc around the seal center is categorized as medical institution names within the institutional text category; and short phrases distributed along the upper and lower edges of the seal are categorized as outpatient category words and specialty identifiers within the business text category. This yields the distribution coordinates of institutional and business text within the seal image. Based on these distribution coordinates, the minimum bounding rectangle contour of each text segment is extracted, resulting in a set of text bounding contours. For the circular or elliptical outer edge of the seal itself, the seal structure range is obtained by fitting the red imprint boundary points. The set of text bounding contours is then categorized and aggregated according to institutional and business levels, merging text bounding contours at the same level to form the same rectangular bounding box. The initial region of interest is defined by shrinking the bounding box edge inwards by a preset distance within the seal structure range. Within the initial region of interest, eight-neighbor connected component detection is performed on the red text pixels. The number of connected components per unit area is counted to obtain the text density, and the text connectivity is determined based on the spacing between adjacent connected components. If the text density is lower than a preset density threshold or there is a significant break in text connectivity, the edge of the region of interest is contracted towards the denser side along the text density gradient direction, and expanded outward towards the sparser side. The adjusted edge is then smoothed to obtain the updated region of interest boundary.

[0039] Perform fine-grained segmentation of the text inside the seal on the complete seal image obtained by splicing across multiple pages.

[0040] In one possible implementation, red channel binarization is performed on the complete seal image, and pixels with red components exceeding a preset red saliency threshold are retained as foreground text pixels to obtain a red text pixel mask.

[0041] Specifically, the spatial position of each character pixel is converted to polar coordinates based on the coordinates of the seal center to obtain the polar radius and polar angle of each character segment relative to the seal center.

[0042] Preferably, text fragments with a polar diameter ranging from 0 to 30% of the stamp radius and a horizontally oriented baseline are categorized as department names in the institutional text category, covering common department names for chronic and special diseases such as cardiovascular medicine and endocrinology; arc-shaped text with a polar diameter ranging from 70% to 95% of the stamp radius and a baseline tangential to the circumference are categorized as medical institution names in the institutional text category; short phrases along the vertical upper and lower edges of the stamp are categorized as outpatient category words and specialty identifiers in the business text category. Further, the minimum bounding rectangle contour is extracted from each text fragment in the distributed coordinates to obtain a set of text bounding contours, which covers the outer frames of four types of text: department names, medical institution names, outpatient category words, and specialty identifiers. For the circular or elliptical outer edge of the stamp, least-squares ellipse fitting is used to fit the outermost boundary point set of the red imprint to obtain the ellipse center, major axis, minor axis, and tilt angle parameters, which constitute the structural range of the stamp.

[0043] In one embodiment, the set of bounding contours of the text is categorized and aggregated according to the institutional level and the business level. At the institutional level, the bounding contour of the medical institution name is fitted into an annular sector bounding box, and the bounding contour of the department name is fitted into a central rectangular bounding box. At the business level, the bounding contours of the outpatient category and the specialty identifier are merged and fitted into a bottom rectangular bounding box, forming a multi-form local bounding region. Then, the annular sector bounding box is shrunk radially inward by a preset distance of 2 to 5 pixels, and each rectangular bounding box is shrunk inward by a preset distance of 2 to 5 pixels along the normal direction of each side, thus defining the initial region of interest.

[0044] It is understandable that color difference noise may remain at the page-crossing splicing points, causing local anomalies in text density and connectivity within the initial region of interest. Eight-neighbor connectivity detection is performed on the red text pixels within the initial region of interest, and the text density is obtained by counting the number of connected components per unit area. Text connectivity is determined based on the centroid distance between adjacent connected components; adjacent connected components with a distance less than one character width are considered connected, while those with a distance greater than two character widths are considered broken.

[0045] For example, if the text density is lower than a preset density threshold or the distance between adjacent connected blocks exceeds a preset connectivity break threshold, the edge of the region of interest is contracted towards the denser text side along the text density gradient direction; otherwise, it is expanded towards the sparser text side. Morphological opening and closing operations are used to smooth the adjusted edge, removing jagged edges and isolated pixel noise, resulting in the updated boundary of the region of interest, which serves as the stable text retrieval range for departmental keyword extraction.

[0046] S103. Within the updated segmentation boundary of interest, perform text line detection and semantic classification to identify the department name, outpatient category identifier, and specialty location, respectively.

[0047] Based on the updated segmentation boundary of interest, horizontal projection and character connectivity region merging are performed on the red text pixels within the boundary. Adjacent text pixels are merged according to character spacing and baseline direction to divide the text line sequence into rows, resulting in text line detection results with start and end coordinates. Based on the text line detection results, a convolutional recurrent neural network is used to perform optical character recognition on the text images of each row in the text line sequence. Specifically, the text line image with height normalized to 32 pixels is input into a residual convolutional network to extract a feature map sequence. Then, the feature map sequence is input into a bidirectional long short-term memory network for context sequence modeling. By connecting a temporal classification decoding layer, the network output is mapped to the character sequence of each row. Based on the semantics of the character sequence, the organizational or business level to which each row belongs is determined, and the department name in the center of the seal, the outpatient category identifier in the upper and lower areas, and the specialty position in the ring edge are identified.

[0048] This implementation method performs line-level text detection and semantic category recognition on the text content within the updated segmentation boundary of interest, and is applied to the extraction of keywords from prescription stamps in chronic and special disease application materials.

[0049] In one possible implementation, the number of pixels in the red text pixels within the updated segmentation boundary of interest is counted row by row along the horizontal direction to obtain a horizontal projection histogram. The trough positions between adjacent projection peaks in the horizontal projection histogram are used as text line separators. Then, the connected regions of adjacent characters within each text line are merged, and the line a character belongs to is determined based on the character spacing and baseline direction, resulting in a text line sequence with start and end coordinates. Further, each line in the text line sequence is cropped to obtain an independent text line image, which is input into a pre-trained recurrent neural network. The recurrent neural network takes the text line image as input and the character sequence as output, and outputs the string of text within the seal after training with commonly used seal fonts.

[0050] In one embodiment, the semantic comparison of the character sequence with a commonly used seal thesaurus is performed: if the character sequence matches the department name entry, the line is classified into the institutional level and marked as the department name; if it matches the outpatient category entry, it is classified into the business level and marked as the outpatient category identifier; if it matches the department name, it is marked as the specialty position, corresponding to the circular edge on the seal.

[0051] Within the updated segmentation boundary of interest, extract department keywords that match the chronic and special disease department directory maintained by the medical insurance agency. Determine whether the department keywords belong to the inner circle department level or the outer circle institution level based on their position in the seal image, and output the department affiliation label.

[0052] In one implementation, morphological analysis is performed on the image region within the updated segmentation boundary of interest and the identified department name characters. If the region is arc-shaped, polar coordinate transformation is performed with the center coordinates of the seal as the pole, unfolding the arc-shaped text image into a horizontal rectangular sequence image. Subsequently, a recurrent neural network is used to extract the character sequence. For horizontally distributed regions, the character sequence is directly extracted. A directory of chronic and special disease departments maintained by the medical insurance agency is loaded. This directory covers departments such as cardiology, endocrinology, nephrology, and neurology that participate in the identification of chronic and special diseases. The extracted character sequence is matched with the longest substring of the directory entries in the chronic and special disease department directory to obtain the department keywords that match the directory entries and their pixel coordinates in the seal image. Based on the pixel coordinates of the department keywords in the seal image and the center coordinates of the seal, the polar radius from the geometric centroid of the bounding box of the department keyword text to the center coordinates of the seal is calculated, and the text arrangement of the department keywords is determined. If the extreme diameter is lower than the preset inner circle extreme diameter threshold of 0.3 and the text is arranged horizontally, it is determined to be a center-position horizontal arrangement. If the extreme diameter is higher than the preset outer circle extreme diameter threshold of 0.7 and the text is arranged in an arc along the circumference, it is determined to be a circular arc arrangement. If the extreme diameter is between 0.3 and 0.7, the baseline curvature of the character sequence is calculated. When the baseline curvature is greater than 0.1, it is determined to be a circular arc arrangement; otherwise, it is determined to be a center-position horizontal arrangement, thus obtaining the arrangement form of the department keywords. According to the arrangement form of the department keywords, if the arrangement form is a center-position horizontal arrangement, the department keywords are classified into the inner circle department level of the seal. If the arrangement form is a circular arc arrangement, the department keywords are classified into the outer circle organization level. A level attribution field is added to the department keywords, and a department attribution label composed of the department keywords, the level to which they belong, and the corresponding seal center coordinates is output.

[0053] In one possible implementation, this method, based on the updated segmentation boundary of interest and text line detection results, performs keyword matching and hierarchical attribution determination on the text within the seal against the chronic and special disease department directory, providing refined labels for determining the department affiliation of chronic and special disease application materials. The chronic and special disease department directory is a set of structured entries pre-stored in the medical insurance agency's database, with each entry containing three fields: full department name, department alias, and corresponding chronic and special disease range.

[0054] For example, the catalog contains department names that participate in the identification of chronic and special diseases, such as cardiology, endocrinology, nephrology, neurology, and rheumatology and immunology. The alias field of the endocrinology entry may include endocrinology and metabolism.

[0055] Specifically, after loading the chronic disease department directory, the character sequence identified within the updated segmentation boundary of interest is matched with the directory entries in the chronic disease department directory using the longest substring matching method. That is, for each directory entry, the longest consecutive identical characters are compared by sliding along the character sequence. If the length reaches the preset matching ratio threshold of the original length of the directory entry, it is determined that there is a keyword corresponding to the directory entry in the character sequence, and the keyword text and the pixel coordinates of the starting and ending characters in the seal image are recorded.

[0056] It should be noted that the departmental stamps on prescription slips for chronic and special diseases have two typical layouts. The inner horizontal layout displays the full name of the department, such as Nephrology, in the center, while the outer arc layout displays the name of the medical institution, such as the Third People's Hospital of a certain city. The two layouts carry different semantic levels and should be distinguished using the same spatial measurement.

[0057] Specifically, based on the pixel coordinates of the department keywords in the seal image and the center coordinates of the seal, the Euclidean distance from the geometric centroid of the bounding box of the department keyword text to the center coordinates of the seal is calculated and denoted as the polar radius r. R represents the equivalent radius of the fitted ellipse of the seal, and the normalized polar radius r / R is obtained.

[0058] In one embodiment, the text baseline direction of the department keywords is detected simultaneously. If the text baseline is horizontal, it is recorded as horizontal; if the text baseline changes tangentially along the circumference of the seal, it is recorded as arc-shaped. Further, the arrangement pattern is determined by combining the normalized radius and the text baseline direction: if r / R is lower than a preset inner radius threshold, for example, 0.3 and the text baseline is horizontal, the arrangement pattern of the department keywords is determined to be a central horizontal arrangement; if r / R is higher than a preset outer radius threshold, for example, 0.7 and the text baseline is tangentially along the circumference, the arrangement pattern of the department keywords is determined to be a circular arc arrangement.

[0059] For example, for a department seal bearing the full name of the Department of Nephrology, the three characters of "Nephrology" are located near the center of the seal and at the baseline level, with a normalized radius of 0.15, which is determined to be a central horizontal arrangement, corresponding to the department level in the inner circle of the seal; a hospital is distributed in an arc shape on the outer edge, with a normalized radius of 0.85, which is determined to be a ring arc arrangement, corresponding to the institutional level in the outer circle of the seal.

[0060] It is understandable that when the arrangement is a horizontal row in the center, the department keywords are included in the inner circle of the seal's department hierarchy, and the keyword text serves as the basis for identifying the disease department; when the arrangement is a circular arc, the department keywords are included in the outer circle of the institution hierarchy, and the keyword text serves as the basis for determining the medical institution that issued the seal.

[0061] Preferably, a hierarchical attribution field is added to the department keywords, where the value of the hierarchical attribution field is either the inner circle department level or the outer circle institution level; then, the department attribution label is output by combining the department keyword text, the hierarchical attribution field, the corresponding seal center coordinates, and the keyword pixel coordinates into a tuple structure.

[0062] It should be noted that, in the case where multiple department keywords are matched within the same seal image, the arrangement pattern determination and hierarchical assignment are performed independently for each department keyword to obtain multiple departmental attribution tags, which are then aggregated into the same tag set according to the seal center coordinates, serving as the complete basis for departmental identification of prescription slips for chronic and special diseases.

[0063] S104. Obtain the directory of chronic and special disease departments maintained by the medical insurance agency, match the department text, outpatient text, and specialist text with the keywords of the directory departments, and conduct a department affiliation assessment based on the position of the department keywords in the stamp area to obtain the department affiliation label.

[0064] Obtain the chronic disease and special disease department directory maintained by the medical insurance agency. Perform string matching on each identified text (department name, outpatient category, and specialty location) against the department keywords in the chronic disease and special disease department directory. Record the matched keywords and their coordinates for each text category to obtain a set of matched keywords. Based on the position of each matched keyword within the seal, assess the affiliation of each keyword: if located in the center of the seal, it is classified as a department; if located on the outer edge of the seal, it is classified as an institution. Summarize these to obtain a department affiliation label composed of the matched keywords, their affiliation level, and the seal's center coordinates.

[0065] This implementation method is applied to the determination of the departmental seal attribution in the prescription slips of chronic and special disease application materials. Based on the identification of three types of targets, namely, departmental name, outpatient category identifier and specialty location, the text corresponding to the three types of targets is matched with the chronic and special disease department directory and the hierarchical attribution is completed.

[0066] In one possible implementation, the directory of chronic and special disease departments maintained by the medical insurance agency is stored in the agency's database as structured entries, with each entry containing department keywords, keyword aliases, and the corresponding range of chronic and special diseases.

[0067] Specifically, the text read from the area where the department name is located, the text read from the area where the outpatient category is located, and the identification text read from the specialty location are respectively matched with the department keywords and keyword aliases in the chronic and special disease department directory. The matching method combines prefix matching and longest common substring matching. If the length of the same characters in a certain type of text and the keyword of a certain entry reaches the preset matching ratio threshold of the original length of the keyword, then the keyword of that entry is recorded as a hit keyword, and the text type and hit position coordinates corresponding to the hit keyword are saved.

[0068] It should be noted that multiple matching keywords may appear simultaneously on a single department seal. Each of the three text types corresponds to several matching entries. All matching entries are compiled into a set of matching keywords. Each item in the set consists of a triplet of matching keyword, text type, and matching location coordinates. Further, an attribution assessment is performed based on the location of the matching location coordinates within the seal. If the matching location coordinates are located in the center area of ​​the seal and the text is arranged horizontally, the matching keyword is assigned to the department level; if it is located on the outer edge of the seal's ring and the text is arranged tangentially along the circumference, it is assigned to the organization level. A level field is added to each item in the matching keyword set, and then combined with the seal's center coordinates to output a department attribution label composed of the matching keyword, the assigned level, and the seal's center coordinates.

[0069] S105. Obtain the scope of chronic and special disease reimbursement configured by the medical insurance agency, map the department affiliation label to the corresponding disease set, calculate the initial disease classification confidence level. If the confidence level meets the preset classification requirements, it is confirmed as the final disease classification confidence level. If the requirements are not met, extract the diagnosis name, drug name, examination items and disease description text from the full text of the prescription, supplement the disease evidence through semantic similarity comparison, and update it as the final disease classification confidence level.

[0070] Obtain the range of chronic and special disease reimbursement categories configured by the medical insurance agency. The range of chronic and special disease reimbursement categories contains a correspondence table between department keywords and disease sets, as well as standard description text for each disease. Perform a lookup and matching of the correspondence table on the matched keywords in the department affiliation tags to obtain the disease set mapped by the matched keywords. For each disease in the disease set, assign a classification score from the department seal to the disease based on the weight of the level to which the department affiliation tag belongs and the string matching similarity between the matched keywords and the entries in the correspondence table. Divide the classification score by the preset highest theoretical score of the department seal for normalization to obtain an initial disease classification confidence level in the range of 0 to 1. Based on the initial disease classification confidence level of each disease within the disease set, the initial disease classification confidence level of each disease is compared with the classification confidence level threshold preset by the medical insurance agency. The value of the classification confidence level threshold ranges from 0.75 to 0.95, with a recommended value of 0.85. If the initial disease classification confidence level reaches the classification confidence level threshold, then the initial disease classification confidence level is used as the final disease classification confidence level for that disease. If the initial disease classification confidence level does not reach the classification confidence level threshold, then that disease is retained as a disease requiring supplementary certification. For the disease requiring supplementary certification, the diagnostic name text, drug name text, examination item text, and disease description text are extracted from the full text of the prescription to obtain the prescription text evidence set for the disease requiring supplementary certification. Based on the prescription text evidence set of the disease to be supplemented, a bidirectional encoder representation model based on medical corpus fine-tuning is used to generate 768-dimensional text vectors for the diagnosis name text, drug name text, examination item text, and disease description text in the prescription text evidence set. Then, reference vectors are generated for the standard description texts of the diseases to be supplemented that are pre-stored in the disease range. The semantic similarity between the text vectors and the reference vectors is compared using cosine similarity to obtain the similarity score of each type of text to the disease to be supplemented. The four similarity scores are weighted and summed according to preset weights to form the disease evidence increment. The initial disease classification confidence of the disease to be supplemented is added to the disease evidence increment to update the final disease classification confidence of the disease to be supplemented.

[0071] In response to the medical insurance agency's requirement for the final disease classification of prescriptions in chronic and special disease application materials, based on the departmental affiliation labels already obtained, confidence calculations and necessary semantic evidence supplementation are performed on the chronic and special disease types corresponding to the prescriptions.

[0072] In one possible implementation, the scope of chronic and special disease reimbursement configured by the medical insurance agency is stored in the agency's policy database in a structured entry format. Each entry includes departmental keywords, a set of diseases, a standard description of each disease, and the International Classification of Diseases (ICD) code for that disease. The set of diseases represents the list of chronic and special diseases eligible for reimbursement corresponding to that department. For example, the set of diseases corresponding to the endocrinology department typically covers chronic and special diseases such as type 2 diabetes, hyperthyroidism, and pituitary diseases.

[0073] Specifically, for the matched keywords in the department affiliation tags, a table lookup is performed in the corresponding relationship table of chronic and special disease reimbursement categories, matching the original keyword with the alias field. After a match is found, the set of diseases associated with that entry is retrieved. For example, for a department seal bearing the name "Endocrinology Department," if the matched keyword is "Endocrinology Department," the corresponding set of chronic and special diseases related to endocrinology is retrieved after a table lookup.

[0074] In one embodiment, for each disease in the disease set, a classification score derived from the department's stamp is assigned. The classification score is a combination of two factors: the first is the weight of the department's hierarchical level within the department's affiliation label, with higher weights for inner-ring departments (e.g., 0.8) and lower weights for outer-ring institutions (e.g., 0.3), reflecting the stronger directness of inner-ring departments in disease classification compared to outer-ring institutions; the second is the string similarity between the matched keyword and the corresponding entry in the relation table, defined as the length of the longest common substring between the matched keyword and the directory entry divided by the original length of the directory entry, denoted as s. The two factors are multiplied to obtain the disease's classification score g. Then, using the maximum value g_max among all disease classification scores in the disease set as the denominator, the classification score for each disease is normalized to the 0-1 range by performing the operation g / g_max, obtaining the initial disease classification confidence level for each disease in the disease set. Neither s nor g_max needs to be manually set; they are automatically obtained from the matching and normalization processes.

[0075] Understandably, the initial disease classification confidence level relies solely on departmental stamp evidence. For simple scenarios where departments and diseases correspond one-to-one, this is sufficient to confirm the classification. However, for complex scenarios where a single department corresponds to multiple chronic and special diseases, supplementary evidence of the prescription text is required. Furthermore, the initial disease classification confidence level for each disease is compared with a classification confidence threshold preset by the medical insurance agency. This classification confidence threshold, for example, is pre-stored in the agency's database as a policy parameter and is set to 0.85. If the initial disease classification confidence level reaches the classification confidence threshold, this value is directly used as the final disease classification confidence level; if the initial disease classification confidence level does not reach the classification confidence threshold, the disease is retained as a disease requiring supplementary evidence.

[0076] It should be noted that for the diseases requiring supplementary certification, the diagnostic name text, drug name text, examination item text, and disease description text are extracted from the full text of the prescription. The diagnostic name text comes from the clinical diagnosis column of the prescription, the drug name text comes from the generic name field of the drug list, the examination item text comes from the laboratory examination item column, and the disease description text comes from the textual description of the condition in the remarks column. The prescription text evidence set for the diseases requiring supplementary certification is thus obtained.

[0077] For example, for each type of text in the prescription text evidence set, a pre-trained word embedding vectorization method is used to generate text vectors. This method is trained on a massive medical corpus to obtain character-level or word-level vector representations. The input is a text string, and the output is a dense vector of fixed dimensions. The disease to be supplemented has pre-stored standard descriptive text within the disease range, and a reference vector is also generated for this standard descriptive text.

[0078] In one embodiment, semantic similarity is compared between the text vector and the reference vector using cosine similarity. The cosine similarity calculation formula is cos=(V1·V2) / (|V1|*|V2|), where V1 is the text vector generated from a certain type of prescription text, V2 is the reference vector generated from the standard description text of the disease to be supplemented, the symbol · represents the vector dot product, and the symbol |·| represents the vector's L2 norm. Four similarity scores are obtained for the diagnosis name text, drug name text, examination item text, and disease description text.

[0079] Preferably, the four similarity scores are weighted and summed according to preset weights, such as 0.4 for diagnosis name, 0.3 for drug name, 0.2 for examination item, and 0.1 for disease description, to reflect the strength of the relationship between the various texts and the disease determination. The weighted summation yields the disease evidence increment for the disease to be supplemented.

[0080] Specifically, an intermediate confidence value is obtained by superimposing the initial disease classification confidence value of the disease to be supplemented with the incremental evidence for that disease. If the intermediate confidence value is higher than 1, it is truncated to 1 and updated to the final disease classification confidence value of the disease to be supplemented. Thus, each disease in the disease set obtains a corresponding final disease classification confidence value, which serves as the numerical basis for subsequent classification threshold determination and stable classification prescription confirmation, covering two scenarios for chronic and special disease applications: direct confirmation by departmental seal and supplementary evidence in the prescription text.

[0081] S106. Obtain the classification threshold and automatic transfer path of chronic and special disease application materials configured by the medical insurance agency, determine the stable classification prescription based on the final disease classification confidence and classification threshold, and input the stable classification prescription into the automatic transfer path to complete the full-process automated management of medical insurance service items based on AI.

[0082] The system obtains the classification thresholds and automatic transfer paths for chronic and special disease application materials configured by the medical insurance agency. It then compares the final disease classification confidence level with the classification threshold. If the final disease classification confidence level is higher than the classification threshold, the prescription corresponding to that disease is marked as a stable classification prescription, resulting in a set of stable classification prescriptions. Based on the disease corresponding to each prescription in the set of stable classification prescriptions, it matches the target transfer node in the automatic transfer path for chronic and special disease application materials. Following the direction of the target transfer node, the stable classification prescriptions are delivered to the automatic transfer path, completing the fully automated management of medical insurance service items based on artificial intelligence.

[0083] This implementation method is applied to the final automated routing process of chronic and special disease application materials within the medical insurance agency. Based on the obtained confidence level of the final disease classification, the prescription is judged to be stably classified and automatically transferred.

[0084] In one possible implementation, the classification threshold configured by the medical insurance agency is pre-stored in the agency's database as a policy parameter, with a value reflecting the minimum requirement for the credibility of the chronic and special disease classification results, for example, set to 0.8. The automatic flow path of the chronic and special disease application materials is stored in the form of a directory-style linked list, with each node in the list corresponding to a specific business step.

[0085] Specifically, for each prescription associated with several diseases, the final disease classification confidence level is compared with the classification threshold. If the final disease classification confidence level is higher than the classification threshold, the prescription corresponding to that disease is marked as a stable classification prescription, and the prescription identifier, corresponding disease, and confidence level value are jointly written into the stable classification prescription set. If it is lower than the classification threshold, the prescription is not included in the stable classification prescription set and is left for manual review. Further, the automatic transfer path for chronic and special disease application materials includes business nodes such as disease registration nodes, benefit eligibility review nodes, designated medical institution matching nodes, and electronic record archiving nodes. Each business node is configured with a corresponding range of diseases and acceptance conditions. Based on the diseases corresponding to each prescription in the stable classification prescription set, the automatic transfer path searches for matching target transfer nodes according to the disease range; for example, a type 2 diabetes prescription is matched to the endocrine disease registration node. According to the direction of the target circulation node, the stable categorized prescriptions are delivered to the corresponding nodes in the automatic circulation path, thus completing the full-process automated management of medical insurance service items based on artificial intelligence.

[0086] This invention provides an AI-based medical insurance service process management and system, mainly including: The prescription image processing module is used to acquire prescription images and page number order, identify the prescription header and patient information column, locate the page edge seam area, detect the medical institution seal at the header, correct the page orientation and complete the cross-page alignment according to the seam seam and cutting line, obtain the header seal coordinates and seam cross-page information, and verify the integrity of the presentation to form a complete seal image. The Region of Interest (ROI) delineation module is used to extract the distribution of organizational and business text from the complete seal image, determine the layout of department seal text, and delineate the ROI based on the text outline and the seal structure range. The updated ROI boundary is obtained by optimizing the text connectivity and layout density. The text recognition and classification module is used to perform text line detection and semantic classification within the updated segmentation boundary of interest, respectively recognizing the department name, outpatient category identifier and specialty location; The department affiliation assessment module is used to obtain the directory of chronic and special disease departments maintained by the medical insurance agency, match the department text, outpatient text, and specialist text with the directory department keywords, and combine the position of the department keywords in the stamp area to conduct department affiliation assessment and obtain the department affiliation label. The disease classification assessment module is used to obtain the scope of chronic and special disease reimbursement diseases configured by the medical insurance agency, map the department affiliation label to the corresponding disease set, calculate the initial disease classification confidence score. If the confidence score meets the preset classification requirements, it is confirmed as the final disease classification confidence score. If the requirements are not met, the diagnosis name, drug name, examination items and disease description text are extracted from the full text of the prescription, and the disease evidence is supplemented by semantic similarity comparison and updated as the final disease classification confidence score. The automated workflow management module is used to obtain the classification thresholds and automatic workflow paths for chronic and special disease application materials configured by the medical insurance agency, determine stable classification prescriptions based on the final disease classification confidence and classification thresholds, and input the stable classification prescriptions into the automatic workflow path to complete the full-process automated management of medical insurance service items based on AI.

[0087] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for managing medical insurance service processes based on AI, characterized in that, The method includes: acquiring a prescription image and page number sequence; identifying the prescription header and patient information column; detecting the medical institution's seal at the header; aligning the seal across pages according to the seam allowance to form a complete seal image; extracting the distribution of institutional and business-related text from the complete seal image; defining the region of interest (ROI) based on the text outline and seal structure range to obtain an updated ROI boundary; within the updated ROI boundary, performing text line detection and semantic classification to identify the department name, outpatient category identifier, and specialty location; acquiring the chronic and special disease department directory maintained by the medical insurance agency; and matching the department text, outpatient text, and specialty text to the directory. Department keywords are used, and their positions within the stamp area are combined to assess departmental affiliation and obtain departmental affiliation labels. The reimbursement range for chronic and special diseases configured by the medical insurance agency is obtained, and the departmental affiliation labels are mapped to the corresponding disease sets to calculate the initial disease classification confidence level. If the initial disease classification confidence level does not meet the preset classification requirements, supplementary disease evidence is provided, and the final disease classification confidence level is updated. The classification threshold and automatic transfer path for chronic and special disease application materials configured by the medical insurance agency are obtained. A stable classification prescription is determined based on the final disease classification confidence level and the classification threshold, and the stable classification prescription is input into the automatic transfer path.

2. The AI-based medical insurance service process management method according to claim 1, characterized in that, The steps of acquiring the prescription image and page number sequence, identifying the prescription header and patient information section, and detecting the medical institution's seal at the header include: performing layout parsing on the prescription image, identifying the prescription header area and patient information section located at the top of the paper, and locating the right or bottom edge of the paper; using Hough line detection to obtain the direction of the paper border and the baseline direction of the text in the prescription image, performing rotation and tilt correction on the prescription image based on the angle between the paper border and the text baseline to obtain a prescription image with corrected orientation; extracting the red imprint component from the prescription image with corrected orientation through color channel separation, and performing connected component detection on the red imprint component in the prescription header area to obtain the coordinates of the header seal on the current page.

3. The AI-based medical insurance service process management method according to claim 1, characterized in that, The step of aligning pages across the seam to form a complete stamp image includes: pairing two pages according to the order of adjacent page numbers; horizontally aligning the seam edges of the two pages according to the direction of the stamp marks to obtain seam cross-page information; determining the splicing reference point based on the geometric position of the page edges of adjacent pages and the spatial overlap area of ​​the red stamp on both sides of the seam; using a scale-invariant feature transformation algorithm to match and spatially register the texture features of the stamp fragments around the splicing reference point; and fusing the registered red stamp area along the seam line to obtain the complete stamp image.

4. The AI-based medical insurance service process management method according to claim 1, characterized in that, The process of defining the region of interest (ROI) based on the bounding contour of the text and the area of ​​the seal structure to obtain the updated ROI boundary includes: using red channel binarization and text contour detection to identify text pixels within the complete seal image; obtaining the distribution coordinates of institutional and business text based on the relative relationship between pixel positions and the seal center coordinates; extracting the minimum bounding rectangle contour for each text segment; classifying and aggregating them according to institutional and business levels to form a rectangular bounding box; shrinking the edge of the rectangular bounding box towards the inside of the seal structure to define the initial ROI region; performing eight-neighbor connected component detection on the red text pixels within the initial ROI region; and shrinking or expanding the edge according to the direction of the text arrangement density gradient to obtain the updated ROI boundary.

5. The AI-based medical insurance service process management method according to claim 1, characterized in that, Within the updated segmentation boundary of interest, text line detection and semantic classification are performed to identify the department name, outpatient category identifier, and specialty location, respectively. This includes: performing horizontal projection and character connected region merging on the red text pixels within the updated segmentation boundary of interest; merging adjacent text pixels according to character spacing and baseline direction to obtain text line detection results with start and end coordinates; using a recurrent neural network to perform optical character recognition on each line of text images in the text line detection results, outputting the character sequence of each line; and identifying the department name at the center of the stamp, the outpatient category identifier in the upper and lower areas, and the specialty location at the ring edge based on the semantics of the character sequence.

6. The AI-based medical insurance service process management method according to claim 1, characterized in that, After obtaining the updated segmentation boundary of interest, the process includes: loading the chronic disease and special disease department directory maintained by the medical insurance agency, which covers the names of departments involved in the identification of chronic diseases and special diseases; performing longest substring matching on the character sequence within the updated segmentation boundary of interest and the directory entries in the chronic disease and special disease department directory to obtain the department keywords that match the directory entries and the pixel coordinates of the department keywords in the stamp image; calculating the polar radius from the geometric centroid of the bounding box of the department keyword text to the center coordinates of the stamp based on the pixel coordinates of the department keywords in the stamp image and the center coordinates of the stamp, and determining the department. The text arrangement of keywords: If the extreme diameter is lower than the preset inner circle extreme diameter threshold and the text is arranged horizontally, it is determined to be a center-position horizontal arrangement; if the extreme diameter is higher than the preset outer circle extreme diameter threshold and the text is arranged in an arc along the circumference, it is determined to be a ring-shaped arc arrangement; if the arrangement is a center-position horizontal arrangement, the department keyword is classified into the inner circle department level of the seal; if the arrangement is a ring-shaped arc arrangement, the department keyword is classified into the outer circle organization level; a level attribution field is added to the department keyword, and a department attribution label composed of the department keyword, the level to which it belongs, and the corresponding seal center coordinates is output.

7. The AI-based medical insurance service process management method according to claim 1, characterized in that, The process involves matching departmental text, outpatient text, and specialty text with keywords from the directory's departmental classification, and then assessing departmental affiliation based on the location of these keywords within the stamp area to obtain a departmental affiliation label. This process includes: performing string matching on each identified text (department name), outpatient category identifier, and specialty location identifier) ​​against the departmental keywords in the chronic and special disease departmental classification directory; recording the matched keywords and their coordinates for each text category to obtain a set of matched keywords; assessing the affiliation of each matched keyword based on its location within the stamp; assigning it to a departmental level if located in the center of the stamp, and to an institutional level if located on the outer edge of the ring; and finally, summarizing the matched keywords, their corresponding level, and the stamp's center coordinates to obtain the departmental affiliation label.

8. The AI-based medical insurance service process management method according to claim 1, characterized in that, The step of mapping the department affiliation tags to the corresponding disease sets and calculating the initial disease classification confidence score includes: obtaining the correspondence table between department keywords and disease sets in the scope of chronic and special disease reimbursement diseases, as well as the standard description text of each disease; performing a lookup match on the correspondence table for the matched keywords in the department affiliation tags to obtain the disease set mapped by the matched keywords; and for each disease in the disease set, matching the matched keywords with the corresponding correspondence table based on the weight of the level to which the department affiliation tag belongs. The string matching similarity of the entries is used to assign a classification score from the department's seal to each disease. The classification score is then normalized to the range of 0 to 1 based on the maximum value to obtain the initial disease classification confidence of each disease in the disease set. The initial disease classification confidence of each disease is compared with the classification threshold. If the initial disease classification confidence reaches the classification threshold, then the initial disease classification confidence is used as the final disease classification confidence of that disease. If it does not reach the classification threshold, the disease is retained as a disease to be supplemented.

9. The AI-based medical insurance service process management method according to claim 1, characterized in that, The supplementary disease evidence, updated to the final disease classification confidence level, includes: retaining diseases that do not meet the classification threshold as diseases requiring supplementation; extracting prescription text evidence sets for the diseases requiring supplementation from the full text of the prescription; generating text vectors for each type of text in the prescription text evidence set using a pre-trained word embedding vectorization method; generating reference vectors for the pre-stored standard description texts of the diseases requiring supplementation; performing semantic similarity comparison between the text vectors and the reference vectors using cosine similarity to obtain a similarity score for each type of text to the disease requiring supplementation; weighting and summing the similarity scores according to preset weights to form a disease evidence increment; and adding the disease evidence increment to the initial disease classification confidence level of the diseases requiring supplementation to update the final disease classification confidence level of the diseases requiring supplementation.

10. An AI-based medical insurance service process management system, characterized in that, The system includes: The prescription image processing module is used to acquire prescription images and page number order, identify the prescription header and patient information column, detect the medical institution's seal at the header, complete cross-page alignment according to the seal seam, and form a complete seal image. The region of interest delineation module is used to extract the distribution of organizational and business text from the complete seal image, delineate the region of interest according to the outer contour of the text and the range of the seal structure, and obtain the updated region of interest boundary. The text recognition and classification module is used to perform text line detection and semantic classification within the updated segmentation boundary of interest, respectively recognizing the department name, outpatient category identifier and specialty location; The department affiliation assessment module is used to obtain the directory of chronic and special disease departments maintained by the medical insurance agency, match the department text, outpatient text, and specialist text with the directory department keywords, and combine the position of the department keywords in the stamp area to conduct department affiliation assessment and obtain the department affiliation label. The disease classification assessment module is used to obtain the scope of chronic and special disease reimbursement diseases configured by the medical insurance agency, map the department affiliation label to the corresponding disease set, and calculate the initial disease classification confidence. If the initial disease classification confidence does not meet the preset classification requirements, disease evidence is supplemented and updated to the final disease classification confidence. The automated circulation management module is used to obtain the classification threshold and automatic circulation path of chronic and special disease application materials configured by the medical insurance agency, determine the stable classification prescription based on the final disease classification confidence level and the classification threshold, and input the stable classification prescription into the automatic circulation path.