Paperless medical data synchronization method based on ETL integration and electronic signature

By using ETL integration and electronic signatures, the problem of data integration and synchronization of multi-format medical documents was solved, enabling accurate parsing and traceability of paperless medical record data, and improving data quality and inter-system reliability.

CN121743393APending Publication Date: 2026-03-27杭州祉医科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing medical institutions suffer from inconsistent data structures and fields in their electronic document records from multiple sources and in multiple formats. This leads to reliance on manual verification and repeated data entry for cross-system data integration, and the lack of a unified verification mechanism during data synchronization affects data quality and reliability.

Method used

By using ETL integration and electronic signatures, field parsing and keyword mapping are performed. A two-stage MedT5 medical semantic transformation model is used to perform semantic modeling within and between paragraphs. A document time sequence chain is constructed and bound to a preset medical record structure template. Combined with original text hash verification, signature certificate verification and timestamp validity verification, paperless medical record data is generated.

Benefits of technology

It enables the parsing, semanticization, and structuring of multi-format medical documents, improves the accuracy of field parsing and the completeness of semantic reconstruction, ensures the integrability and traceability of data between systems, and enhances the data reliability and application stability of paperless medical record management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121743393A_ABST
    Figure CN121743393A_ABST
Patent Text Reader

Abstract

The invention discloses a paperless medical data synchronization method based on ETL integration and an electronic signature, and the method comprises the following steps: obtaining an electronic signature log, carrying out the field analysis, and generating a signature keyword set; based on the signature keyword set, performing backtracking retrieval to obtain a target source data set; executing multi-format analysis on the target source data set to generate preliminary analysis data; performing pre-cleaning processing on the preliminary analysis data to obtain cleaned medical content data; inputting the cleaned medical content data into a double-stage MedT5 medical semantic conversion model to obtain semantic structured medical data; constructing a document time sequence chain based on the semantic structured medical data to obtain paperless medical record data; and verifying the paperless medical record data to generate a paperless medical data chain. According to the method, a two-stage MedT5 semantic conversion model is adopted, and structuring and credible synchronization of the medical documents is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information processing technology, and in particular to a paperless medical data synchronization method based on ETL integration and electronic signatures. Background Technology

[0002] Currently, medical institutions commonly use multi-source, multi-format electronic document recording methods, including scanned PDFs, editable PDFs, XML structured documents, JSON data, and custom-formatted documents. Due to the inconsistent data structures across systems, the lack of a consistent organizational form for time fields, document type fields, and patient identity fields leads to reliance on manual verification and repetitive data entry during cross-system data integration and medical record construction. Traditional ETL processing workflows are mostly linear, with limited ability to recognize paragraph structure, semantic relationships, and document types. When faced with complex medical documents, they are prone to inaccurate field mapping, disordered paragraph order, and incomplete structural reconstruction. Furthermore, the semantic transformation stage typically relies on conventional text processing algorithms, which cannot effectively model the intra- and inter-paragraph hierarchical structure of long documents, easily causing semantic jumps and missing fields when generating medical record content.

[0003] Regarding data synchronization and security verification, existing methods generally rely on file-level synchronization. There is a lack of a unified mechanism for verifying original hashes, signature certificates, and timestamps, making it difficult to ensure the traceability and integrity of synchronized data. The synchronization process often depends on manual checks or simple matching rules, which can easily lead to inconsistencies in verification, incomplete certificate chain verification, and inaccurate timestamp validity assessments, thus affecting the data quality and reliability of the paperless medical record system.

[0004] Therefore, how to provide a paperless medical data synchronization method based on ETL integration and electronic signature is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a paperless medical data synchronization method based on ETL integration and electronic signatures. In the data processing stage, this invention transforms medical document content from multiple internal hospital systems into a processable data structure by parsing electronic signature logs through field analysis, keyword mapping retrieval, and multi-format document parsing. In the semantic conversion stage, a two-stage MedT5 medical semantic conversion model is used to jointly model the internal structure of paragraphs and the semantic relationships between paragraphs, generating structured and reusable semantically structured medical data. In the medical record generation stage, a document time sequence chain is constructed based on time, document type, and patient identity fields, and this time sequence chain is bound to a preset medical record structure template to form paperless medical record data with a unified format. In the data verification and synchronization stage, original text hash verification, signature certificate verification, and timestamp validity verification are performed sequentially. Data that passes verification is loaded into the file server and database, and the synchronization status is recorded.

[0006] A paperless medical data synchronization method based on ETL integration and electronic signature according to an embodiment of the present invention includes the following steps:

[0007] Obtain the electronic signature logs generated by the electronic signature system, parse the fields in the electronic signature logs, and generate a set of signature keywords;

[0008] Based on the signature keyword set, a retrospective retrieval is performed in the hospital application system according to the preset keyword mapping rules to obtain the target source dataset;

[0009] Perform multi-format parsing on the target source dataset to generate preliminary parsed data;

[0010] Pre-cleaning is performed on the initially analyzed data to obtain cleaned medical content data;

[0011] The cleaned medical content data is input into the two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data.

[0012] Based on semantically structured medical data, a document time sequence chain is constructed, and the document time sequence chain is bound to a preset medical record structure template to obtain paperless medical record data;

[0013] Perform plaintext hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data to generate a paperless medical data chain.

[0014] Optionally, obtaining the electronic signature logs generated by the electronic signature system, parsing the fields in the electronic signature logs, and generating a set of signature keywords specifically includes:

[0015] Obtain the electronic signature log from the electronic signature system, and use all records in the obtained electronic signature log in sequence as the set of electronic signature records to be parsed;

[0016] Each electronic signature record in the set of electronic signature records to be parsed is parsed to obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field.

[0017] The signature key quadruple is formed by combining the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field.

[0018] According to the order in which electronic signature records appear in the electronic signature log, the signature key quadruple is added to the initialization set in sequence to construct the signature key set.

[0019] Optionally, the step of performing a retrospective retrieval in the hospital application system based on the signature keyword set and according to a preset keyword mapping rule to obtain the target source dataset specifically includes:

[0020] Iterate through each set of signature keywords in the signature keyword set and obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object field, and the timestamp field respectively.

[0021] Based on the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field, a keyword matching vector is generated according to the keyword mapping rules.

[0022] Input the keyword matching vector into the backtracking retrieval interface of the hospital application system, and perform field-level comparison on each document data in the hospital application system to determine the target medical document source data set that meets the time comparison conditions of consistent digital signature serial number field, consistent original text hash value field, consistent signature object unique serial number field, and timestamp field.

[0023] Each target medical document source data set is sequentially added to the initialized target source dataset to construct the target source dataset.

[0024] Optionally, performing multi-format parsing on the target source dataset to generate preliminary parsed data specifically includes:

[0025] For each document in the target source dataset, the format is identified and determined to be scanned PDF, editable PDF, XML, JSON, or custom format.

[0026] Optical character recognition (OCR) is performed on document data identified as scanned PDF format to obtain the corresponding text sequence;

[0027] Text extraction processing is performed on document data that is determined to be in editable PDF format to obtain the corresponding text sequence;

[0028] Document data identified as being in XML format is expanded according to the hierarchical node order to obtain the corresponding node sequence;

[0029] For document data identified as JSON format, perform key-value expansion processing according to the key path order to obtain the corresponding key-value sequence;

[0030] For document data that is determined to be in a custom format, field parsing is performed according to the corresponding template structure to obtain the corresponding field sequence. The text sequence, node sequence, key-value sequence and field sequence are then combined to form preliminary parsed data.

[0031] Optionally, the pre-cleaning process performed on the initially analyzed data to obtain cleaned medical content data specifically includes:

[0032] Character-level cleaning is performed on the text sequences, node sequences, key-value sequences, and field sequences in the preliminary parsing data. This includes deleting non-displayable characters, deleting repeated consecutive characters, removing meaningless whitespace characters, removing interfering symbols, and standardizing punctuation formats to obtain noise cleanup results.

[0033] The noise cleanup results are labeled and normalized. Non-standard labels, duplicate labels, and labels with inconsistent formats are adjusted according to a unified label format to obtain a standardized label result.

[0034] The standardized label results are processed to unify the encoding, converting content with different encoding formats into the same encoding format to obtain a unified encoding result.

[0035] The encoded unified results are subjected to structural segmentation processing, which segments the content according to sentence boundaries, field boundaries, or node boundaries to form cleaned medical content data.

[0036] Optionally, the step of inputting the cleaned medical content data into a two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data specifically includes:

[0037] The cleaned medical content data is represented as a content sequence in sequence. Segmentation prompts are inserted into the content sequence according to sentence and paragraph boundaries, and paragraph labels are inserted at the paragraph type positions to form a marked content sequence.

[0038] Vectorization processing is performed sequentially on each content item in the labeled content sequence. Each content item is converted into a corresponding vector representation according to the vector embedding rules. The vector embedding rules include: assigning a unique token number to each content item, retrieving the corresponding vector entry in the embedding table according to the token number, constructing a vector representation according to the values ​​of each dimension of the vector entry, and arranging all vectors in the original order of the content items to form an input vector sequence.

[0039] The input vector sequence is segmented according to the segmentation prompts, and the input vector sequence is split into multiple consecutive vector subsequences according to the position of the segmentation prompts.

[0040] In this sequence, each occurrence of a segmentation prompt mark serves as the starting boundary of a segment, and the vector items located between adjacent segmentation prompt marks form a vector subsequence of the same segment, thus creating a set of segment vector subsequences.

[0041] Each segment vector subsequence is input into the two-stage encoder of the two-stage MedT5 medical semantic transformation model, which includes an intra-segment encoder and an inter-segment encoder.

[0042] Each paragraph vector subsequence is first input into the intra-segment encoder. Intra-segment encoding processing is performed on each paragraph vector subsequence. The intra-segment encoding processing includes: sequentially performing attention weight calculation, performing vector weighted convergence processing based on attention weight, and performing forward transformation processing on each vector in the paragraph vector subsequence to obtain the intra-segment semantic representation sequence. Then, paragraph representation vectors are extracted from the intra-segment semantic representation sequence to form the paragraph representation sequence.

[0043] The paragraph representation sequence is input into the inter-segment encoder, and inter-segment encoding processing is performed on the paragraph representation sequence. The inter-segment encoding processing includes: sequentially performing inter-segment attention weight calculation on each paragraph representation in the paragraph representation sequence, performing weighted convergence processing of paragraph representations based on inter-segment attention weights, and performing inter-segment forward transformation processing to obtain a global paragraph semantic representation sequence.

[0044] The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model, and the target sequence is generated through a multi-path cross-attention sublayer.

[0045] The target sequence is parsed according to the boundaries of medical fields, semantic blocks, and document content to form semantically structured medical data.

[0046] Optionally, the step of inputting the global paragraph semantic representation sequence into the decoder of the two-stage MedT5 medical semantic transformation model, and generating the target sequence through a multi-path cross-attention sublayer, specifically includes:

[0047] The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model. The decoder includes a multi-path cross-attention sublayer, and each path corresponds one-to-one with the paragraph semantic representation in the global paragraph semantic representation sequence.

[0048] During the decoding process, the paragraph path gating coefficient is determined based on the current paragraph label. The determination of the paragraph path gating coefficient includes: performing similarity calculation between the current paragraph label and the semantic representation of each paragraph; generating corresponding path weight values ​​according to the paragraph number based on the similarity calculation results; performing normalization on all path weight values ​​to form the paragraph path gating coefficient; and weighting and aggregating the path outputs of the multi-path cross-attention sublayer based on the paragraph path gating coefficient to obtain the decoding cross-attention output.

[0049] During the decoding process, the paragraph state is maintained, and the paragraph state determination process is performed on the content of each decoding output. When the current decoding output matches the paragraph terminator, the paragraph state is updated incrementally according to the paragraph order. After the paragraph state is updated, the paragraph path to which the current decoding belongs is determined according to the updated paragraph state. The cross attention path of the decoder is switched to the paragraph path corresponding to the updated paragraph state so that the subsequent decoding generation process can continue to be performed under the new paragraph path.

[0050] The generation process is performed based on the decoded cross-attention output. The generation process includes: sequentially performing state update processing, symbol prediction processing, and symbol selection processing on the decoded cross-attention output to form a target vector sequence arranged in the decoding order.

[0051] The target vector sequence is input to the vector mapping table corresponding to the output mapping matrix. By retrieving the symbol entries corresponding to each vector in the vector mapping table, the contents of each symbol entry are combined to generate the text-to-text target sequence.

[0052] Optionally, the step of constructing a document time-series chain based on semantically structured medical data and binding the document time-series chain to a preset medical record structure template to obtain paperless medical record data specifically includes:

[0053] Extract the corresponding time content, document type content, and patient identity content from the time field, document type field, and patient identity field in the semantically structured medical data, respectively. Combine the above three contents in each piece of semantically structured medical data into a key field triple in a fixed order, and then gather all the key field triples in the original order to form a document key field sequence.

[0054] The key field triples in the document's key field sequence are sorted according to their time content. All key field triples are rearranged according to their chronological order, and the rearranged order forms the sorted document key field sequence.

[0055] The sorted document key field sequence is aggregated according to document type content. Key field triples that have the same document type content and appear in adjacent positions after sorting are divided into document fragments of the same type. All document fragments are then formed into a document type fragment sequence in the order of appearance.

[0056] The document type fragment sequence is divided according to the patient identity content. Document type fragments corresponding to the same patient identity content are combined into document type fragment subsequences of the same patient. Each document type fragment subsequence is then connected sequentially according to the time content order to form the document time sequence chain of the corresponding patient.

[0057] The document sequence chain of each patient is bound to the template node in the preset medical record structure template according to the document type content. Each document type fragment in the document sequence chain is bound to the template node in the medical record structure template corresponding to that document type, and the bound order forms a template binding sequence.

[0058] The template node sequence in the preset medical record structure template includes multiple template nodes for organizing the overall structure of the medical record. The template nodes include the medical record homepage node, admission record node, progress record node, medical order record node, examination and test record node, surgical record node, discharge record node, and follow-up record node. Each template node is used to represent the content of the corresponding type of medical document.

[0059] The template binding sequence is combined sequentially according to the node arrangement order of the medical record structure template. All bound content is then subjected to structure splicing processing to generate paperless medical record data with a uniform format.

[0060] Optionally, the step of performing plaintext hash verification, signature certificate verification, and timestamp validity verification on the paperless medical record data to generate a paperless medical data chain specifically includes:

[0061] The original text content in the paperless medical record data is processed by hash calculation in sequence. The hash value calculated for each piece of original text content is used as a hash record. All hash records are arranged in the order of the original text content to form a hash record sequence.

[0062] Each hash record in the hash record sequence is compared with the original hash value at the corresponding position in the semantically structured medical data to form a hash verification result;

[0063] The certificate identifier extraction process is performed sequentially on the signature certificate content in the paperless medical record data. The certificate identifier obtained from parsing each signature certificate content is taken as a certificate record and arranged sequentially according to the order of the data entries to form a certificate record sequence.

[0064] Based on each certificate record in the certificate record sequence, a certificate matching process is performed in the trusted certificate store to generate a signature certificate verification result;

[0065] The timestamp content in the paperless medical record data is processed sequentially to convert each timestamp content into a timestamp record, and then arranged in the order of the data entries to form a timestamp record sequence.

[0066] The timestamp record sequence is sequentially processed for format checking, validity period checking, and time sequence checking to generate a timestamp validity verification result.

[0067] The hash verification results, signature certificate verification results, and timestamp validity verification results are merged according to the correspondence of data entries. The three types of verification results for each data entry are combined into a comprehensive verification record, and then arranged in the order of the data entries to form a comprehensive verification record sequence.

[0068] Synchronization status recording processing is performed sequentially on the synchronous loading record sequence, converting each synchronous loading record into a synchronization status entry, and arranging them sequentially according to the synchronization order to form a synchronization status entry sequence. The synchronization status entry sequence is used as the final generated paperless medical data chain.

[0069] The beneficial effects of this invention are:

[0070] This invention constructs a processing chain from electronic signature log parsing to semantically structured medical data generation, enabling multi-format medical documents to complete parsing, semanticization, and structuring within a unified process. The two-stage MedT5 medical semantic transformation model establishes semantic relationships both within and between paragraphs, clearly presenting the hierarchical structure of medical documents in the semantic space. This solves the problem of traditional linear parsing methods failing to accurately identify paragraph order and field relationships, thereby improving the accuracy of field parsing and the completeness of semantic reconstruction.

[0071] This invention utilizes time, document type, and patient identity fields to generate a document timeline during the medical record construction process, enabling document content collected across systems to be sorted and organized according to the actual medical process. By binding the document timeline with a preset medical record structure template, paperless medical record data with a uniform format can be formed, thereby reducing inconsistencies in document organization caused by manual intervention and improving the integrability and readability of medical record content across different systems.

[0072] This invention performs original hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data sequentially before data synchronization, ensuring a consistent verification mechanism for the synchronized data in terms of content integrity, source authenticity, and time validity. Combined with the synchronized loading and status recording process between the file server and database, it ensures that the final generated paperless medical data chain maintains data consistency and traceability during inter-system transmission, thereby improving the data reliability and application stability of paperless medical record management in actual deployment environments. Attached Figure Description

[0073] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0074] Figure 1 This is a flowchart of a paperless medical data synchronization method based on ETL integration and electronic signature proposed in this invention;

[0075] Figure 2 This is a schematic diagram of the two-stage MedT5 medical semantic transformation model structure in a paperless medical data synchronization method based on ETL integration and electronic signature proposed in this invention.

[0076] Figure 3 This is a schematic diagram of the document time-series chain construction structure in the paperless medical data synchronization method based on ETL integration and electronic signature proposed in this invention. Detailed Implementation

[0077] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0078] refer to Figures 1-3 A paperless medical data synchronization method based on ETL integration and electronic signatures includes the following steps:

[0079] Obtain the electronic signature logs generated by the electronic signature system, parse the fields in the electronic signature logs, and generate a set of signature keywords;

[0080] Based on the signature keyword set, a retrospective retrieval is performed in the hospital application system according to the preset keyword mapping rules to obtain the target source dataset;

[0081] Perform multi-format parsing on the target source dataset to generate preliminary parsed data;

[0082] Pre-cleaning is performed on the initially analyzed data to obtain cleaned medical content data;

[0083] The cleaned medical content data is input into the two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data.

[0084] Based on semantically structured medical data, a document time sequence chain is constructed, and the document time sequence chain is bound to a preset medical record structure template to obtain paperless medical record data;

[0085] Perform plaintext hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data to generate a paperless medical data chain.

[0086] In this embodiment, obtaining the electronic signature logs generated by the electronic signature system, parsing the fields of the electronic signature logs, and generating a signature keyword set specifically includes:

[0087] Obtain the electronic signature log from the electronic signature system, and use all records in the obtained electronic signature log in sequence as the set of electronic signature records to be parsed;

[0088] Each electronic signature record in the set of electronic signature records to be parsed is parsed to obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field.

[0089] The signature key quadruple is formed by combining the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field.

[0090] According to the order in which electronic signature records appear in the electronic signature log, the signature key quadruple is added to the initialization set in sequence to construct the signature key set.

[0091] This implementation method parses the structured fields of the electronic signature log, organizing the digital signature serial number, original hash value, unique serial number of the signed object, and timestamp into a four-tuple set of signature keywords. This provides a clear locating basis for subsequent backtracking retrieval in multiple hospital business systems. This processing method improves the accuracy of the mapping from log to document source data, reduces the risk of omissions caused by manual comparison, and provides a clear identification entry point for parsing multi-format documents. Simultaneously, the keyword set constructed based on sequential processing maintains the correlation between the signing behavior and the document generation behavior, providing a reliable data foundation for consistency verification and source tracing during medical record synchronization.

[0092] In this embodiment, the step of performing a retrospective retrieval in the hospital application system based on the signature keyword set and according to a preset keyword mapping rule to obtain the target source dataset specifically includes:

[0093] Iterate through each set of signature keywords in the signature keyword set and obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object field, and the timestamp field respectively.

[0094] Based on the digital signature serial number field, the original hash value field, the unique serial number field of the signed object, and the timestamp field, a keyword matching vector is generated according to the keyword mapping rules. The keyword mapping rules include: matching the digital signature serial number field with the signature serial number field of the document record in the hospital application system; comparing the consistency of the original hash value field with the original hash field of the document record in the hospital application system; matching the unique serial number field of the signed object with the unique document number field of the document record in the hospital application system; and comparing the timestamp field with the document generation time field of the document record in the hospital application system.

[0095] Input the keyword matching vector into the backtracking retrieval interface of the hospital application system, and perform field-level comparison on each document data in the hospital application system to determine the target medical document source data set that meets the time comparison conditions of consistent digital signature serial number field, consistent original text hash value field, consistent signature object unique serial number field, and timestamp field.

[0096] Each target medical document source data set is sequentially added to the initialized target source dataset to construct the target source dataset.

[0097] This implementation employs a backtracking retrieval mechanism based on signature keyword quadruples, enabling field-by-field matching of digital signature serial numbers, original text hash values, unique serial numbers of signed objects, and timestamps within the hospital application system. By performing field-level comparisons of document records using keyword matching vectors, the target medical document source data corresponding to the signature behavior can be accurately located among multi-source document data, reducing retrieval bias caused by inconsistencies in field formats between different systems. This approach enhances the reliability of the association between log records and document data, improves retrieval accuracy, and provides an accurate and complete source data foundation for subsequent multi-format document parsing and semantic structuring processing, thereby improving the accuracy and stability of the overall medical record synchronization process.

[0098] In this embodiment, the step of performing multi-format parsing on the target source dataset to generate preliminary parsed data specifically includes:

[0099] For each document in the target source dataset, the format is identified and determined to be scanned PDF, editable PDF, XML, JSON, or custom format.

[0100] Optical character recognition (OCR) is performed on document data identified as scanned PDF format to obtain the corresponding text sequence;

[0101] Text extraction processing is performed on document data that is determined to be in editable PDF format to obtain the corresponding text sequence;

[0102] Document data identified as being in XML format is expanded according to the hierarchical node order to obtain the corresponding node sequence;

[0103] For document data identified as JSON format, perform key-value expansion processing according to the key path order to obtain the corresponding key-value sequence;

[0104] For document data that is determined to be in a custom format, field parsing is performed according to the corresponding template structure to obtain the corresponding field sequence. The text sequence, node sequence, key-value sequence and field sequence are then combined to form preliminary parsed data.

[0105] In this embodiment, the pre-cleaning process performed on the initially analyzed data to obtain cleaned medical content data specifically includes:

[0106] Character-level cleaning is performed on the text sequences, node sequences, key-value sequences, and field sequences in the preliminary parsing data. This includes deleting non-displayable characters, deleting repeated consecutive characters, removing meaningless whitespace characters, removing interfering symbols, and standardizing punctuation formats to obtain noise cleanup results.

[0107] The noise cleanup results are labeled and normalized. Non-standard labels, duplicate labels, and labels with inconsistent formats are adjusted according to a unified label format to obtain a standardized label result.

[0108] The standardized label results are processed to unify the encoding, converting content with different encoding formats into the same encoding format to obtain a unified encoding result.

[0109] The encoded unified results are subjected to structural segmentation processing, which segments the content according to sentence boundaries, field boundaries, or node boundaries to form cleaned medical content data.

[0110] In this embodiment, the step of inputting the cleaned medical content data into a two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data specifically includes:

[0111] The cleaned medical content data is represented as a content sequence in sequence. Segmentation prompts are inserted into the content sequence according to sentence and paragraph boundaries, and paragraph labels are inserted at the paragraph type positions to form a marked content sequence.

[0112] Vectorization processing is performed sequentially on each content item in the labeled content sequence. Each content item is converted into a corresponding vector representation according to the vector embedding rules. The vector embedding rules include: assigning a unique token number to each content item, retrieving the corresponding vector entry in the embedding table according to the token number, constructing a vector representation according to the values ​​of each dimension of the vector entry, and arranging all vectors in the original order of the content items to form an input vector sequence.

[0113] The input vector sequence is segmented according to the segmentation prompts, and the input vector sequence is split into multiple consecutive vector subsequences according to the position of the segmentation prompts.

[0114] In this sequence, each occurrence of a segmentation prompt mark serves as the starting boundary of a segment, and the vector items located between adjacent segmentation prompt marks form a vector subsequence of the same segment, thus creating a set of segment vector subsequences.

[0115] Each segment vector subsequence is input into the two-stage encoder of the two-stage MedT5 medical semantic transformation model, which includes an intra-segment encoder and an inter-segment encoder.

[0116] Each paragraph vector subsequence is first input into the intra-segment encoder. Intra-segment encoding processing is performed on each paragraph vector subsequence. The intra-segment encoding processing includes: sequentially performing attention weight calculation, performing vector weighted convergence processing based on attention weight, and performing forward transformation processing on each vector in the paragraph vector subsequence to obtain the intra-segment semantic representation sequence. Then, paragraph representation vectors are extracted from the intra-segment semantic representation sequence to form the paragraph representation sequence.

[0117] The paragraph representation sequence is input into the inter-segment encoder, and inter-segment encoding processing is performed on the paragraph representation sequence. The inter-segment encoding processing includes: sequentially performing inter-segment attention weight calculation on each paragraph representation in the paragraph representation sequence, performing weighted convergence processing of paragraph representations based on inter-segment attention weights, and performing inter-segment forward transformation processing to obtain a global paragraph semantic representation sequence.

[0118] The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model, and the target sequence is generated through a multi-path cross-attention sublayer.

[0119] The target sequence is parsed according to the boundaries of medical fields, semantic blocks, and document content to form semantically structured medical data.

[0120] This implementation method inputs the cleaned medical content data into a two-stage MedT5 medical semantic transformation model, thereby achieving hierarchical modeling of the paragraph structure and semantic relationships of medical documents. By introducing segmentation prompts and paragraph tags into the content sequence, the model can distinguish paragraph boundaries and paragraph types, giving the paragraph segmentation process clear boundary criteria.

[0121] During the encoding phase, the intra-segment encoder performs attention convergence and forward transformation on the content within a segment, generating a segment representation vector that reflects the semantic features within the segment. The inter-segment encoder further models the semantic relationships between different segments, improving the model's ability to handle cross-segment semantic associations. In the decoding phase, a multi-path cross-attention sublayer generates the target sequence, enabling the model to simultaneously focus on local semantics and global segment structure during generation. This processing method achieves high-precision semantic reconstruction and field extraction in medical documents with diverse content and complex segment structures, providing higher-quality structured data input for subsequent medical record template binding and document temporal chain construction, thereby improving the accuracy, consistency, and automation of document structure processing.

[0122] In this embodiment, the step of inputting the global paragraph semantic representation sequence into the decoder of the two-stage MedT5 medical semantic transformation model, and generating the target sequence through a multi-path cross-attention sublayer, specifically includes:

[0123] The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model. The decoder includes a multi-path cross-attention sublayer, and each path corresponds one-to-one with the paragraph semantic representation in the global paragraph semantic representation sequence.

[0124] During the decoding process, the paragraph path gating coefficient is determined based on the current paragraph label. The determination of the paragraph path gating coefficient includes: performing similarity calculation between the current paragraph label and the semantic representation of each paragraph; generating corresponding path weight values ​​according to the paragraph number based on the similarity calculation results; performing normalization on all path weight values ​​to form the paragraph path gating coefficient; and weighting and aggregating the path outputs of the multi-path cross-attention sublayer based on the paragraph path gating coefficient to obtain the decoding cross-attention output.

[0125] During the decoding process, the paragraph state is maintained, and the paragraph state determination process is performed on the content of each decoding output. When the current decoding output matches the paragraph terminator, the paragraph state is updated incrementally according to the paragraph order. After the paragraph state is updated, the paragraph path to which the current decoding belongs is determined according to the updated paragraph state. The cross attention path of the decoder is switched to the paragraph path corresponding to the updated paragraph state so that the subsequent decoding generation process can continue to be performed under the new paragraph path.

[0126] The generation process is performed based on the decoded cross-attention output. The generation process includes: sequentially performing state update processing, symbol prediction processing, and symbol selection processing on the decoded cross-attention output to form a target vector sequence arranged in the decoding order.

[0127] The target vector sequence is input to the vector mapping table corresponding to the output mapping matrix. By retrieving the symbol entries corresponding to each vector in the vector mapping table, the contents of each symbol entry are combined to generate the text-to-text target sequence.

[0128] This implementation introduces a multi-path cross-attention mechanism during the decoding stage, enabling the global paragraph semantic representation to participate in target sequence generation in a segmented manner. By calculating the paragraph path gating coefficient based on paragraph labels, the semantics of different paragraphs participate in the generation process according to their weights, thus maintaining paragraph-level semantic consistency in medical documents with complex paragraph structures. Maintaining the paragraph state during decoding and switching to the corresponding path when a paragraph terminator is encountered allows the model to gradually generate structured content according to the actual paragraph order of the document, reducing cross-paragraph semantic confusion. Relying on the target vector sequence formed by the combination of state updates, symbol prediction, and symbol selection, as well as the text output generated based on the vector mapping table, the generation process has stable symbol alignment capabilities. This approach improves the ability to maintain the paragraph order and semantic structure of the document during the decoding stage, enhancing the accuracy and structural consistency of semantic generation.

[0129] In this embodiment, the step of constructing a document time sequence chain based on semantically structured medical data and binding the document time sequence chain to a preset medical record structure template to obtain paperless medical record data specifically includes:

[0130] Extract the corresponding time content, document type content, and patient identity content from the time field, document type field, and patient identity field in the semantically structured medical data, respectively. Combine the above three contents in each piece of semantically structured medical data into a key field triple in a fixed order, and then gather all the key field triples in the original order to form a document key field sequence.

[0131] The key field triples in the document's key field sequence are sorted according to their time content. All key field triples are rearranged according to their chronological order, and the rearranged order forms the sorted document key field sequence.

[0132] The sorted document key field sequence is aggregated according to document type content. Key field triples that have the same document type content and appear in adjacent positions after sorting are divided into document fragments of the same type. All document fragments are then formed into a document type fragment sequence in the order of appearance.

[0133] The document type fragment sequence is divided according to the patient identity content. Document type fragments corresponding to the same patient identity content are combined into document type fragment subsequences of the same patient. Each document type fragment subsequence is then connected sequentially according to the time content order to form the document time sequence chain of the corresponding patient.

[0134] The document sequence chain of each patient is bound to the template node in the preset medical record structure template according to the document type content. Each document type fragment in the document sequence chain is bound to the template node in the medical record structure template corresponding to that document type, and the bound order forms a template binding sequence.

[0135] The template node sequence in the preset medical record structure template includes multiple template nodes for organizing the overall structure of the medical record. The template nodes include the medical record homepage node, admission record node, progress record node, medical order record node, examination and test record node, surgical record node, discharge record node, and follow-up record node. Each template node is used to represent the content of the corresponding type of medical document.

[0136] The template binding sequence is combined sequentially according to the node arrangement order of the medical record structure template. All bound content is then subjected to structure splicing processing to generate paperless medical record data with a uniform format.

[0137] In this embodiment, the step of performing plaintext hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data to generate a paperless medical data chain specifically includes:

[0138] The original text content in the paperless medical record data is processed by hash calculation in sequence. The hash value calculated for each piece of original text content is used as a hash record. All hash records are arranged in the order of the original text content to form a hash record sequence.

[0139] Each hash record in the hash record sequence is compared with the original hash value at the corresponding position in the semantically structured medical data to form a hash verification result;

[0140] The certificate identifier extraction process is performed sequentially on the signature certificate content in the paperless medical record data. The certificate identifier obtained from parsing each signature certificate content is taken as a certificate record and arranged sequentially according to the order of the data entries to form a certificate record sequence.

[0141] Based on each certificate record in the certificate record sequence, a certificate matching process is performed in the trusted certificate store to generate a signature certificate verification result;

[0142] The timestamp content in the paperless medical record data is processed sequentially to convert each timestamp content into a timestamp record, and then arranged in the order of the data entries to form a timestamp record sequence.

[0143] The timestamp record sequence is sequentially processed for format checking, validity period checking, and time sequence checking to generate a timestamp validity verification result.

[0144] The hash verification results, signature certificate verification results, and timestamp validity verification results are merged according to the correspondence of data entries. The three types of verification results for each data entry are combined into a comprehensive verification record, and then arranged in the order of the data entries to form a comprehensive verification record sequence.

[0145] Synchronization status recording processing is performed sequentially on the synchronous loading record sequence, converting each synchronous loading record into a synchronization status entry, and arranging them sequentially according to the synchronization order to form a synchronization status entry sequence. The synchronization status entry sequence is used as the final generated paperless medical data chain.

[0146] Example 1:

[0147] To verify the feasibility of this invention in practice, it was applied to the information technology construction process of a large comprehensive medical institution. The institution had long used multiple systems in parallel to record medical documents, including an inpatient system, electronic medical record system, imaging system, and nursing system. The document formats generated by different systems differed; some were stored as scanned PDFs, some as editable PDFs, and others as structured XML or JSON documents. There was a lack of a unified field structure among the documents, inconsistent field order, and inconsistent timestamp formats. Searching and verifying information across systems required manual confirmation of each item, resulting in long medical record processing cycles and a high risk of missing fields. With the gradual advancement of paperless management, the institution hoped to use this invention to achieve structured, chronological, and traceable synchronization of medical documents throughout the institution, thereby solving the problems of inconsistent medical record construction, difficulties in cross-format parsing, and incomplete data verification processes.

[0148] During the pilot deployment phase, the hospital selected medical documents from some inpatient departments as test subjects. The system first parses the signature logs generated by the electronic signature system, extracting the digital signature serial number, original hash value, unique serial number of the signed object, and timestamp. It then retrieves the source documents corresponding to the signatures from several internal hospital business systems. The source documents cover three formats: scanned PDF, editable PDF, and XML. The system performs multi-format parsing on these documents, followed by pre-cleaning of the parsing results, including noise removal, encoding standardization, and paragraph segmentation. In the semantic reconstruction phase, a two-stage MedT5 medical semantic transformation model encodes the semantics within paragraphs and further models the semantic relationships between paragraphs, thereby generating structured medical content data. The system uses the time field, document type field, and patient identity field in the structured data to construct a document time sequence chain, which is then bound to a preset medical record structure template to form paperless medical record data with a consistent format. In the final data security stage, the system performs original hash verification, signature certificate verification, and timestamp validity verification. Data that passes the verification is automatically synchronized to the file server and database, and the corresponding synchronization status is recorded.

[0149] To verify the feasibility of this invention in practice, it was applied to the synchronization of inpatient medical records in a medical institution. The test data covered 1280 inpatient-related documents, including approximately 540 scanned PDFs, 430 editable PDFs, and 310 XML documents. Under the traditional manual processing workflow, assembling a complete inpatient medical record took an average of 16 minutes, with a field omission rate of approximately 3.4%. After introducing this invention, through automatic parsing and semantic structuring, the average time for generating field structures for a single document was approximately 3.1 seconds, reducing the average time to construct a complete medical record to about 3 minutes. Simultaneously, in the field consistency verification stage, the two-stage semantic model achieved a 96.7% accuracy rate in reconstructing documents with disordered paragraph order, an improvement of approximately 18 percentage points compared to the traditional rule-based parsing method. In the paperless medical record synchronization verification, the original text hash verification pass rate reached 100%, the signature certificate verification pass rate reached 99.8%, and the timestamp validity judgment accuracy rate reached 99.5%, significantly improving data consistency during the synchronization process.

[0150] Table 1 Comparison of Medical Document Processing and Synchronization Effects

[0151] Indicator Name Traditional process results Results of the Implementation of the Invention illustrate Total number of documents 1280 copies 1280 copies Same data size Average processing time per document 16 minutes 3 minutes From manual processing to automation Paragraph order recognition accuracy 78.5% 96.7% Two-stage semantic modeling significantly improves performance. Field omission rate 3.4% 0.6% Semantic structuring results in higher field coverage. Hash verification pass rate 92.1% 100% Automatic comparison improves verification integrity Signature certificate verification pass rate 95.4% 99.8% Introducing a certificate matching mechanism Accuracy of timestamp validity assessment 89.3% 99.5% A unified validity testing process File server synchronization success rate 96.8% 99.9% Data consistency improvement Database synchronization success rate 95.7% 99.9% Improved synchronization accuracy Consistency score of medical record construction (0–100) 82.3 97.4 The structure is more stable after template binding.

[0152] As can be seen from the table above, this invention significantly improves upon traditional processes in several key performance indicators related to medical document processing and paperless medical record synchronization. Regarding document processing efficiency, the traditional manual process takes an average of about 16 minutes to process a single document, while this invention, through automated field parsing, semantic reconstruction, and template binding, reduces the processing time to about 3 minutes, improving efficiency by more than five times. In terms of paragraph order recognition, the accuracy rate of traditional rule-based parsing methods is approximately 78.5%, and it is prone to recognition errors when encountering documents with overlapping paragraphs, discontinuous logical relationships between paragraphs, or irregular formats. This invention employs a two-stage semantic modeling approach, simultaneously incorporating intra-paragraph semantic structure and inter-paragraph relationships into the modeling system, achieving a paragraph order recognition accuracy rate of 96.7%, significantly improving the data quality of structured documents.

[0153] Regarding field quality, traditional processes suffer from a field omission rate of approximately 3.4% due to manual data entry and system differences. This invention, through unified field extraction and structured generation, reduces the omission rate to 0.6%, effectively reducing missing items and directly improving the completeness of medical records. In terms of data security verification, this invention sequentially performs hash verification, signature certificate verification, and timestamp validity verification. All three verification results are superior to those of traditional processes. The hash verification pass rate reaches 100%, and the timestamp validity judgment accuracy rate reaches 99.5%, ensuring that the synchronized data source is trustworthy, the content has not been tampered with, and that it possesses a valid timeline.

[0154] Regarding synchronization stability, the success rates of file server and database synchronization in traditional processes are 96.8% and 95.7%, respectively. Occasional data inconsistencies and loading failures during synchronization can affect medical record archiving. This invention, through a unified format for structured data and stable output after multiple checks, achieves a 99.9% success rate for both types of synchronization, realizing highly consistent paperless medical record synchronization. In terms of overall medical record construction effectiveness, the consistency score of the traditional process is 82.3, while this invention, through temporal chain construction and template binding mechanisms, improves the consistency score to 97.4, indicating a clearer overall document structure and more reliable content organization. This invention achieves significant results in efficiency, accuracy, completeness, and consistency, validating its application value in paperless medical record construction scenarios.

[0155] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A paperless medical data synchronization method based on ETL integration and electronic signature, characterized in that, Includes the following steps: Obtain the electronic signature logs generated by the electronic signature system, parse the fields in the electronic signature logs, and generate a set of signature keywords; Based on the signature keyword set, a retrospective retrieval is performed in the hospital application system according to the preset keyword mapping rules to obtain the target source dataset; Perform multi-format parsing on the target source dataset to generate preliminary parsed data; Pre-cleaning is performed on the initially analyzed data to obtain cleaned medical content data; The cleaned medical content data is input into the two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data. Based on semantically structured medical data, a document time sequence chain is constructed, and the document time sequence chain is bound to a preset medical record structure template to obtain paperless medical record data; Perform plaintext hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data to generate a paperless medical data chain.

2. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of obtaining the electronic signature logs generated by the electronic signature system, parsing the fields in the electronic signature logs, and generating a set of signature keywords specifically includes: Obtain the electronic signature log from the electronic signature system to obtain the set of electronic signature records to be parsed; Each electronic signature record in the set of electronic signature records to be parsed is parsed to obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object field, and the timestamp field. The signature key quadruple is formed by combining the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field. According to the order in which electronic signature records appear in the electronic signature log, the signature key quadruple is added to the initialization set in sequence to construct the signature key set.

3. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of obtaining the target source dataset by performing a backtracking search in the hospital application system based on the signature keyword set and according to a preset keyword mapping rule specifically includes: Iterate through each set of signature keywords in the signature keyword set to obtain the digital signature serial number field, the original hash value field, the unique serial number field of the signature object field, and the timestamp field. Based on the digital signature serial number field, the original hash value field, the unique serial number field of the signature object, and the timestamp field, a keyword matching vector is generated according to the keyword mapping rules. Input the keyword matching vector into the backtracking retrieval interface of the hospital application system, and perform field-level comparison on each document data in the hospital application system to determine the target medical document source data set. Each target medical document source data set is sequentially added to the initialized target source dataset to construct the target source dataset.

4. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of performing multi-format parsing on the target source dataset to generate preliminary parsed data specifically includes: For each document in the target source dataset, the format is identified and determined to be scanned PDF, editable PDF, XML, JSON, or custom format. Optical character recognition (OCR) is performed on document data identified as scanned PDF format to obtain the corresponding text sequence; Text extraction processing is performed on document data that is determined to be in editable PDF format to obtain the corresponding text sequence; Document data identified as being in XML format is expanded according to the hierarchical node order to obtain the corresponding node sequence; For document data identified as JSON format, perform key-value expansion processing according to the key path order to obtain the corresponding key-value sequence; For document data that is determined to be in a custom format, field parsing is performed according to the corresponding template structure to obtain the corresponding field sequence. The text sequence, node sequence, key-value sequence and field sequence are then combined to form preliminary parsed data.

5. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The pre-cleaning process includes noise removal, label straightening, coding standardization, and structural segmentation.

6. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of inputting the cleaned medical content data into the two-stage MedT5 medical semantic transformation model to obtain semantically structured medical data specifically includes: The cleaned medical content data is represented as a content sequence in sequence. Segmentation prompts are inserted into the content sequence according to sentence and paragraph boundaries, and paragraph labels are inserted at the paragraph type positions to form a marked content sequence. Vectorization processing is performed on each content item in the labeled content sequence in turn. Each content item is converted into a corresponding vector representation according to the vector embedding rules to form an input vector sequence. Based on the segmentation prompts, the input vector sequence is segmented into multiple consecutive vector subsequences according to the position of the segmentation prompts, forming a set of segment vector subsequences; Each segment vector subsequence is input into the two-stage encoder of the two-stage MedT5 medical semantic transformation model, which includes an intra-segment encoder and an inter-segment encoder. Each paragraph vector subsequence is first input into the intra-segment encoder, and intra-segment encoding is performed on each paragraph vector subsequence to form a paragraph representation sequence; The paragraph representation sequence is input into the inter-segment encoder, and inter-segment encoding processing is performed on the paragraph representation sequence to obtain the global paragraph semantic representation sequence. The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model, and the target sequence is generated through a multi-path cross-attention sublayer. The target sequence is parsed according to the boundaries of medical fields, semantic blocks, and document content to form semantically structured medical data.

7. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 6, characterized in that, The process of inputting the global paragraph semantic representation sequence into the decoder of the two-stage MedT5 medical semantic transformation model, and generating the target sequence through a multi-path cross-attention sublayer, specifically includes: The global paragraph semantic representation sequence is input into the decoder of the two-stage MedT5 medical semantic transformation model, the decoder including a multi-path cross-attention sublayer; During the decoding process, the paragraph path gating coefficient is determined based on the current paragraph label. The path outputs of the multi-path cross-attention sub-layer are weighted and converged based on the paragraph path gating coefficient to obtain the decoded cross-attention output. During the decoding process, the paragraph state is maintained. When the current decoding output is a paragraph terminator, the paragraph state is updated, and the corresponding paragraph path is switched in the updated paragraph state to continue decoding and generation. Based on the decoding cross-attention output, the generation process is performed to form a target vector sequence, and the target vector sequence is mapped by the output mapping matrix to generate a text-to-text target sequence.

8. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of constructing a document time-series chain based on semantically structured medical data and binding the document time-series chain to a preset medical record structure template to obtain paperless medical record data specifically includes: Key field triples are constructed based on semantically structured medical data, and all key field triples are aggregated to form a sequence of key fields in the document. The key field triples in the document's key field sequence are sorted according to their time content to form a sorted document key field sequence. The sorted sequence of key fields in the documents is aggregated according to the document type content to form a sequence of document type fragments. The document type fragment sequence is divided according to the patient's identity content, and each document type fragment subsequence is connected sequentially to form a document time sequence chain; The document sequence chain of each patient is bound to the template node in the preset medical record structure template according to the document type and content, forming a template binding sequence; The template binding sequence is combined sequentially according to the node arrangement order of the medical record structure template. The structure splicing process is performed on all the bound content to generate paperless medical record data.

9. The paperless medical data synchronization method based on ETL integration and electronic signature according to claim 1, characterized in that, The process of performing plaintext hash verification, signature certificate verification, and timestamp validity verification on paperless medical record data to generate a paperless medical data chain specifically includes: The original text content in the paperless medical record data is processed sequentially using hash calculations to generate hash verification results; The signature certificate content in the paperless medical record data is processed sequentially to extract the certificate identifier, thereby generating the signature certificate verification result; The timestamp content in the paperless medical record data is sequentially parsed to generate timestamp validity verification results; The hash verification results, signature certificate verification results, and timestamp validity verification results are merged according to the correspondence of data entries to form a comprehensive verification record sequence; The synchronously loaded data sequence is processed by recording status. The synchronization status corresponding to each synchronously loaded data is recorded as a status record entry. All status record entries are combined in the synchronization order to generate a paperless medical data chain.