Medical electronic bill full-process management method and system based on block chain

Through blockchain technology and image encryption methods, the problems of incomplete information and insufficient security in medical electronic bill management have been solved, and traceability and supervision of the entire life cycle of bills have been realized, and the security and efficiency of the flow process have been improved.

CN120473101APending Publication Date: 2025-08-12SHANGHAI ELECTRONIC CERTIFICATE AUTHORITY CENT CO LTD

Patent Information

Application Number
CN202510552254.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing technology has problems such as incomplete information, untraceable status and insufficient security guarantee in medical electronic bill management, especially in the context of multi-party collaboration.

Method used

The full-process management method of medical electronic bills based on blockchain is adopted, and identity registration and verification is carried out through the identity chain smart contract, and the traceability smart contract is used to realize bill uploading, status update and query, combining image encryption technology to ensure data security and privacy, and automatically record the bill status change trajectory.

Benefits of technology

It realizes traceability, supervision and security of the entire life cycle of medical electronic bills, improves bill processing efficiency, ensures the authenticity and integrity of data, and supports collaborative operation by multiple parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120473101A_ABST
    Figure CN120473101A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical electronic bill management, in particular to a medical electronic bill full-process management method and system based on a block chain. The method comprises the steps that a block chain node performs identity registration and identity verification based on an identity chain smart contract deployed on an alliance chain; the block chain node executes various operations on the medical electronic bill based on the traceability smart contract deployed on the alliance chain; wherein the identity chain smart contract performs identity permission verification on the block chain node executing the operation of the medical electronic bill; the various operations on the medical electronic bills at least comprise a bill uploading operation or a bill state updating operation. According to the invention, the authenticity and credibility of the bill data are ensured by using the tampering resistance of the block chain, the data privacy security is ensured and the bill state change track is automatically recorded through the identity chain smart contract and the traceability smart contract, so that the whole bill circulation process is traceable, auditing and supervising.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical electronic invoice management, and more specifically, to a blockchain-based full-process management method and system for medical electronic invoices. Background Art

[0002] With the continuous development of information technology and medical insurance systems, electronic medical receipts are gradually replacing traditional paper receipts and becoming the core document for medical expense settlement and reimbursement. The circulation process of electronic medical receipts typically includes: hospital issuance of receipts, patient submission of reimbursement applications, insurance company verification of receipt authenticity and validity, and insurance company updates of receipt status, ultimately completing the reimbursement process. In practice, the circulation of electronic medical receipts involves numerous challenges, including numerous business nodes, complex document submission, and difficulty in regulating capital flows. This presents significant risks for duplicate reimbursement and insurance fraud.

[0003] Currently, key challenges remain: improving the traceability and controllability of electronic medical receipts throughout all stages of their circulation, streamlining user operations, and improving the efficiency and security of receipt processing. This will not only facilitate efficient collaboration and standardized operational processes among medical institutions, insurance companies, and regulatory authorities, but also provide crucial support for users to quickly complete reimbursement applications.

[0004] Existing technologies, such as Chinese patent CN119006146A, disclose a blockchain-based method and system for assessing financing client risk. This method obtains accounts receivable information from bills, performs structured processing on registration information such as bill payment changes, extensions, cancellations, and objections, and stores this information on the blockchain, creating a complete data record and enabling full bill lifecycle management. This technical solution encompasses bill information upload, data on-chain, and lifecycle management, and leverages the blockchain's immutable nature to enhance the traceability of bill management information.

[0005] However, the above technical solutions still have the following deficiencies:

[0006] 1) The bill information processed mainly focuses on account data and does not cover key information fields in medical electronic bills, such as electronic bill codes, billing unit codes, and payer information. This makes it difficult to meet the refined needs of full-process medical bill management.

[0007] 2) The recorded data is limited to bill payment registration information and does not include key status change information in the life cycle of medical electronic bills, such as bill redemption, insurance acceptance, and claim completion, lacking comprehensive recording and traceability of business status;

[0008] 3) There is a lack of encryption protection mechanism for the bill content, and the identity of the data uploader is not strictly verified. There is a potential risk of data leakage and tampering. The system's controllability and information security need to be improved.

[0009] To sum up, the current management of medical electronic invoices still faces problems such as incomplete information, untraceable status, and insufficient security. It is urgent to propose a new full-process management solution for medical electronic invoices to promote the safe and efficient circulation of medical electronic invoices in multi-party collaborative scenarios. Summary of the Invention

[0010] The purpose of this invention is to provide a blockchain-based full-process management method and system for medical electronic invoices, so as to solve the problems faced by the existing technology in the management of medical electronic invoices, such as incomplete information, untraceable status, and insufficient security.

[0011] To achieve the above objectives, the present invention provides a full-process management method for medical electronic invoices based on blockchain, wherein the blockchain is a consortium chain, and the method comprises the following steps:

[0012] Blockchain nodes perform identity registration and authentication based on the identity chain smart contract deployed on the consortium chain;

[0013] Blockchain nodes execute various operations on medical electronic receipts based on the traceability smart contract deployed on the alliance chain;

[0014] The identity chain smart contract verifies the identity authority of the blockchain node that performs the operation of the medical electronic bill;

[0015] The various operations on medical electronic receipts include at least a receipt upload operation or a receipt status update operation;

[0016] The bill uploading operation includes uploading bill image information and associated element field information;

[0017] The bill status update operation includes modifying the electronic bill status to a preset status according to the bill life cycle.

[0018] In some embodiments, the identity chain smart contract includes at least the following fields:

[0019] Digital identity, public key, identity metadata, update time, verification status, authenticator, and digital signature.

[0020] In some embodiments, the blockchain node performs identity registration based on the identity chain smart contract deployed on the consortium chain, further comprising:

[0021] Blockchain nodes, which provide public keys, identity metadata, and identity verification to the IdentityChain smart contract;

[0022] The identity chain smart contract generates a digital identity based on the public key, identity metadata and identity verification person, hashes the public key to obtain the public key hash value, generates the update time, digital signature and initial verification status, and returns the digital identity to the blockchain node.

[0023] In some embodiments, the blockchain node performs identity authentication based on the identity chain smart contract deployed on the consortium chain, further comprising:

[0024] Blockchain nodes, providing public keys and digital identities to the Identity Chain smart contract;

[0025] The identity chain smart contract looks up identity information based on the digital identity, hashes the provided public key, verifies the matching of the public key hash value, and updates the verification status.

[0026] In some embodiments, the traceability smart contract includes at least the following fields:

[0027] Ticket identification key, associated element field information, ticket image encryption metadata and digital signature.

[0028] In some embodiments, the associated element field information includes at least the electronic invoice code, electronic invoice number, verification code, invoicing unit code, invoicing unit name, payee type, payee name, payee code and invoicing date.

[0029] In some embodiments, the bill uploading operation further includes:

[0030] The blockchain node provides the bill upload data to the traceability smart contract, wherein the bill upload data includes at least a digital signature, associated element field information, and bill image encryption metadata;

[0031] The traceability smart contract performs hash encryption based on the associated element field information to generate a bill identification key, uses the bill identification key as the primary key, uploads the bill data to the chain, and returns the bill identification key to the blockchain node after the chain is successfully uploaded.

[0032] In some embodiments, the traceability smart contract uses a hash algorithm to encrypt and desensitize sensitive information in the associated element field information.

[0033] In some embodiments, the ticket status update operation further includes:

[0034] The blockchain node provides bill update data to the traceability smart contract, wherein the bill update data includes at least a digital signature, an electronic bill status, and a bill identification key;

[0035] The traceability smart contract verifies whether the current electronic bill status meets the update conditions. If so, the electronic bill status is updated. If not, it cannot be updated and failure is returned directly.

[0036] In some embodiments, the electronic bill status includes the following preset states according to the bill life cycle:

[0037] Normal invoicing, red cancellation, refund, insurance acceptance, claim reimbursement and reimbursement completion;

[0038] If the current electronic invoice status is red cancellation or reimbursement completed, it is considered that the update conditions are not met.

[0039] In some embodiments, the traceability smart contract automatically performs the following operations through an iterator when executing a bill status update:

[0040] The digital signature of the blockchain node that records the caller;

[0041] Record update operation timestamp;

[0042] Records the updated ticket status.

[0043] In some embodiments, the operation on the medical electronic bill further includes a bill information query operation;

[0044] The bill information query operation further includes:

[0045] Blockchain nodes provide bill information query request data to the traceability smart contract;

[0046] The traceability smart contract queries the relevant information of medical electronic receipts based on the receipt information query request data, and returns the query results to the blockchain node.

[0047] In some embodiments, the bill information query operation includes a bill basic information query operation and a bill history update information query operation;

[0048] When performing a basic bill information query operation, the bill information query request data includes at least a bill identification key, and the traceability smart contract queries the basic information of the medical electronic bill to obtain a query result;

[0049] When executing the bill history update information query operation, the bill information query request data includes at least the bill identification key and digital signature, and the traceability smart contract traverses and queries all historical update information related to the medical electronic bill to obtain the query results.

[0050] In some embodiments, before performing the bill upload operation, the image of the medical electronic bill is further enhanced, further comprising:

[0051] Perform uniformity analysis on the image background color based on the color clustering algorithm to determine whether there is color difference in the image background;

[0052] Analyze the image edge clarity based on the edge detection algorithm to determine whether the image structure is complete;

[0053] If the image background color difference or image edge clarity does not meet the requirements, image enhancement processing is performed, and the image enhancement processing includes median filtering, Laplacian sharpening and image segmentation processing.

[0054] In some embodiments, the various operations on the medical electronic receipt further include performing image encryption processing on the image of the medical electronic receipt:

[0055] The image data is divided into blocks, the image is encoded into multiple data blocks according to a fixed byte length, and the last block is padded to meet the encryption requirements;

[0056] Encrypt each image block separately based on the symmetric encryption algorithm to obtain multiple ciphertext blocks;

[0057] Concatenate all ciphertext blocks in numerical order to form a combined ciphertext, and set delimiters to mark block boundaries;

[0058] Construct structured data containing the merged ciphertext, the total number of blocks and the encrypted symmetric encryption key, and encrypt the structured data based on the hash algorithm to generate bill image encryption metadata.

[0059] In some embodiments, the various operations on the medical electronic receipt further include image decryption processing of the encrypted metadata of the receipt image:

[0060] Decrypt the encrypted metadata of the bill image to obtain the combined ciphertext, the total number of blocks, and the encrypted symmetric encryption key;

[0061] Split the merged ciphertext into multiple image ciphertext blocks according to the set delimiter;

[0062] Decrypting the encrypted symmetric encryption key to obtain the symmetric encryption key used to encrypt the original image;

[0063] Decrypting the image ciphertext blocks one by one using the symmetric encryption key to restore the original image block data;

[0064] Merge the decrypted image block data in sequence to form a complete image byte stream;

[0065] The image byte stream is decoded into an image format to generate a visible image for user access.

[0066] To achieve the above objectives, the present invention provides a blockchain-based full-process management system for medical electronic invoices, including several front-end modules and a central system:

[0067] The plurality of front-end modules are used to perform various operations on medical electronic receipts;

[0068] The central system is used to deploy and execute the identity chain smart contract and the traceability smart contract;

[0069] The plurality of front-end modules and the central system work together to realize the above-mentioned blockchain-based full-process management method for medical electronic invoices.

[0070] In some embodiments, the plurality of front-end processor modules include a first front-end processor module disposed in a hospital and a second front-end processor module disposed in an insurance company;

[0071] The first front-end module is used to perform bill upload operations, bill status update operations, and bill information query operations;

[0072] The second front-end module is used to perform ticket status update operations and ticket information query operations.

[0073] The present invention provides a blockchain-based full-process management method and system for medical electronic invoices. The method utilizes the tamper-proof nature of the blockchain to ensure the authenticity and reliability of invoice data throughout its life cycle. Through identity chain smart contracts and traceability smart contracts, the method enables authorized sharing of invoice information while ensuring data privacy and security. It automatically records the change trajectory of invoice status, making the entire invoice flow traceable, auditable, and controllable. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The above and other features, properties and advantages of the present invention will become more apparent from the following description taken in conjunction with the accompanying drawings and embodiments, in which like reference numerals denote like features throughout, wherein:

[0075] Figure 1 A block-chain-based full-process management method for medical electronic bills according to an embodiment of the present invention is disclosed;

[0076] Figure 2 A schematic diagram of a smart contract processing process according to an embodiment of the present invention is disclosed;

[0077] Figure 3 A flowchart of image data preprocessing according to an embodiment of the present invention is disclosed;

[0078] Figure 4 A flowchart of an image enhancement process according to an embodiment of the present invention is disclosed;

[0079] Figure 5 A flowchart of an image encryption process according to an embodiment of the present invention is disclosed;

[0080] Figure 6 A flowchart of an image decryption process according to an embodiment of the present invention is disclosed;

[0081] Figure 7 A full-link schematic diagram of a medical electronic bill full-process management system according to an embodiment of the present invention is disclosed. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the invention and are not intended to limit the invention.

[0083] The present invention proposes a blockchain-based full-process management method and system for medical electronic invoices, which combines blockchain technology with image encryption technology to provide hospitals and insurance companies with a decentralized full-process management solution for storing invoice circulation information. This improves the richness of invoice information in the circulation process of medical electronic invoices, achieves traceability for invoice status changes, and improves the security of the invoice information transmission process.

[0084] Figure 1 The following is a step diagram of a full-process management method for medical electronic bills based on blockchain according to an embodiment of the present invention. Figure 1 As shown, the present invention proposes a full-process management method for medical electronic invoices based on blockchain, where the blockchain is a consortium chain, and the method includes the following steps:

[0085] Step S1: The blockchain node performs identity registration and authentication based on the identity chain smart contract deployed on the alliance chain;

[0086] Step S2: The blockchain node executes various operations on medical electronic receipts based on the traceability smart contract deployed on the alliance chain.

[0087] The identity chain smart contract verifies the identity authority of the blockchain node that performs the operation of the medical electronic bill;

[0088] The operation on the medical electronic receipt at least includes a receipt upload operation or a receipt status update operation;

[0089] The bill uploading operation includes uploading the bill image and associated element field information;

[0090] The bill status update operation includes modifying the electronic bill status to a preset status according to the bill life cycle.

[0091] The present invention is based on a blockchain-based full-process management method for medical electronic invoices, which applies blockchain technology to the full life cycle management of medical electronic invoices, covering the whole process collaboration from invoicing, reimbursement to medical insurance settlement. By defining the invoice state machine (such as "normal invoicing", "red cancellation", "reimbursement completed") and realizing multi-party status synchronization based on smart contracts, it solves the technical problem of dynamic tracking and management of medical electronic invoices in cross-institutional circulation.

[0092] In this embodiment, the blockchain is a consortium blockchain. A consortium blockchain is a blockchain technology that is jointly managed by multiple authorized organizations (blockchain nodes). Unlike open public blockchains, consortium blockchains place greater emphasis on protecting data privacy, strengthening security measures, and complying with relevant regulations.

[0093] When a consortium blockchain is launched or a new member joins, roles are assigned and their permissions and responsibilities are determined according to pre-set rules. To ensure the security of data transmission and the authenticity of the participants' identities, each blockchain node needs to generate a key pair: a public key for encryption and authentication, and a private key for decryption and digital signatures.

[0094] The present invention provides a full-process management method for medical electronic invoices, which involves the design of a blockchain system and an image processing algorithm.

[0095] Figure 2 A schematic diagram of a smart contract processing process according to an embodiment of the present invention is disclosed. Figure 2 As shown, blockchain smart contracts include an identity chain smart contract and a traceability smart contract. The blockchain system of this invention implements full-process management by deploying two key smart contracts: the identity chain smart contract manages identity rights, such as caller registration and authentication, while the traceability smart contract tracks the status and controls business logic throughout the invoice lifecycle. These two smart contracts work together to build a distributed, trusted, full-process management framework for medical electronic invoices.

[0096] To enhance information security during bill uploads and updates, this embodiment incorporates an identity chain smart contract. When a caller uploads electronic medical bill information, the identity chain smart contract is invoked to verify the caller's identity and, upon successful verification, digitally sign the call. The digital signature information is uploaded to the blockchain along with the bill information.

[0097] Furthermore, the identity chain smart contract contains at least the following fields:

[0098] Digital identity (DID), public key, identity metadata, update time, verification status, identity authenticator, and digital signature.

[0099] Among them, digital identity (DID) plays an important role in the alliance chain. It provides each participant with a decentralized and trusted identity, avoiding the single point of failure and trust risks brought by traditional centralized identity authentication;

[0100] The public key refers to the encryption key bound to the digital identity, which is used for identity authentication, data encryption and signature verification to ensure the security of communication and data interaction;

[0101] Identity metadata refers to supplementary information associated with a digital identity, used to enrich and describe identity information;

[0102] Update time refers to the timestamp of the last time the identity information was modified or verified, which facilitates recording the changes in the identity life cycle;

[0103] Verification status refers to the validity status of the current digital identity, which directly reflects the credibility of the identity;

[0104] The identity verifier refers to the node or organization responsible for verifying the digital identity and confirming its authenticity, generally a trusted entity in the consortium chain;

[0105] A digital signature is a signature generated by encrypting identity information using the private key corresponding to the identity, ensuring the integrity, authenticity, and tamper-proofing of the identity data.

[0106] In this embodiment, the execution process of the identity chain smart contract includes at least part or all of the processes including identity registration and identity authentication.

[0107] The steps of identity registration further include:

[0108] As the caller's blockchain node, it provides the public key, identity metadata, and identity verification person to the identity chain smart contract;

[0109] The identity chain smart contract generates a unique digital identity based on the public key, identity metadata and identity verification person, hashes the public key to obtain the public key hash value, generates the update time, digital signature (generated by the private key) and the initial verification status (such as "success"), uploads all information to the chain, and returns the digital identity to the blockchain node.

[0110] The authentication steps further include:

[0111] As the caller's blockchain node, it provides the public key and digital identity to the identity chain smart contract;

[0112] The identity chain smart contract looks up identity information based on the digital identity, hashes the provided public key, verifies the matching of the public key hash value, and updates the verification status.

[0113] More specifically, the identity chain smart contract verifies whether the public key hash value matches the public key hash value stored on the chain. If it matches and has not expired, the verification status is updated to "verified" and the digital signature is returned. Otherwise, the verification status is updated to "failed" and a failure result is returned.

[0114] In combination with traceability requirements, a medical electronic invoice chain is designed and a traceability smart contract is formulated. The traceability smart contract contains at least the following fields:

[0115] Invoice identification key, associated element field information, electronic invoice status, invoice image encryption metadata and digital signature.

[0116] Among them, the associated element field information includes at least the electronic invoice code, electronic invoice number, verification code, invoicing unit code, invoicing unit name, payee type, payee name, payee code, and invoicing date.

[0117] Specifically, the above fields are:

[0118] The electronic bill code refers to the code used to identify the type or category of electronic bills, which is usually uniformly formulated by the bill management department;

[0119] The electronic invoice number refers to a set of numbers generated by the invoicing unit and uniquely corresponding to the same invoice code, used to identify a specific electronic invoice;

[0120] A check code is a set of additional codes used to verify the validity of a bill number and prevent forgery, usually generated by a specific algorithm.

[0121] The issuing unit code refers to the unique identification code registered in the system for the unit that issues the electronic invoice;

[0122] The invoicing unit name refers to the name of the unit that actually issues the electronic invoice, which corresponds to the invoicing unit code;

[0123] Payee type refers to the category to which the payee belongs, and is used for classification management;

[0124] The payee name refers to the name of the individual or institution that actually pays the money or fees;

[0125] The payee code is a number used to uniquely identify the payee, usually generated by the system or relevant management agency;

[0126] The invoice date refers to the specific date when the electronic invoice is generated or issued, and records the actual issuance time of the invoice.

[0127] Among them, the electronic invoice code, electronic invoice number and check code together constitute the three elements of invoice verification data. If the three are exactly the same, they can be considered to be the same medical electronic invoice.

[0128] The bill identification key is generated based on the encryption of these three elements and is used to further verify the uniqueness of the bill.

[0129] In this embodiment, the execution process of the traceability smart contract includes at least operations on medical electronic invoices, including invoice upload, invoice status update, invoice basic information query, and invoice history update information query.

[0130] For the bill upload operation, the execution process of the traceability smart contract includes the following steps:

[0131] As the caller's blockchain node, provide the bill upload data to the traceability smart contract. The bill upload data includes at least the digital signature, associated element field information, and bill image encryption metadata;

[0132] The traceability smart contract performs hash encryption based on the associated element field information to generate a bill identification key. The bill identification key is used as the primary key to upload the basic bill information including the bill upload data to the chain, and the bill identification key is returned to the blockchain node as the caller after the chain is successfully uploaded.

[0133] More specifically, the traceability smart contract performs hash encryption on the electronic bill code, electronic bill number, and check code in the associated element field information to generate a unique bill identification key;

[0134] Furthermore, the traceability smart contract uses a hash algorithm to encrypt and desensitize the sensitive information in the associated element field information to achieve irreversible encrypted storage.

[0135] Taking into account that the associated element field information in medical electronic receipts involves some sensitive information (such as the billing unit code, billing unit name, payee type, payee name, payee code, etc.), in this embodiment, the traceability smart contract defines desensitization processing for these field information to protect privacy and security.

[0136] For the bill status update operation, the execution process of the traceability smart contract includes the following steps:

[0137] The blockchain node acting as the caller provides the bill update data to the traceability smart contract, where the bill update data includes at least the digital signature, the electronic bill status, and the bill identification key;

[0138] The traceability smart contract verifies whether the current electronic bill status meets the update conditions. If the update conditions are met, the electronic bill status is updated. If not, it cannot be updated and failure is returned directly.

[0139] In this embodiment, according to the bill life cycle, the electronic bill status is set to the following preset states during the circulation process:

[0140] Normal invoicing, red cancellation, refund, insurance acceptance, claim reimbursement and reimbursement completion;

[0141] Among them, if the current electronic invoice status is red cancellation or reimbursement completed, it is considered that the update conditions are not met.

[0142] Specifically, these preset states are:

[0143] Normal invoicing means that medical institutions issue medical electronic invoices that meet the requirements for patients in accordance with the prescribed procedures, and the invoice content is true, complete and valid;

[0144] Red-offset refers to the invoicing unit offsetting the issued electronic invoice and generating a corresponding red-invoice record to offset the original invoice amount;

[0145] Returning an electronic invoice means returning the issued electronic invoice, invalidating or revoking the invoice record;

[0146] Insurance acceptance refers to the state where the insurance company completes the preliminary review and confirms acceptance after receiving the electronic medical bills submitted by the patient, and then enters the claim process;

[0147] Claim reimbursement refers to the process by which the insurance company completes the claim review and pays the relevant reimbursement amount based on the accepted medical electronic receipts;

[0148] Reimbursement completion means that the claims and financial payment processes are all completed, the reimbursement matters related to medical electronic invoices are officially closed, and the invoice status enters the final archiving stage.

[0149] From the above status definitions, it can be seen that the statuses of "Normal Invoicing", "Refund", "Insurance Acceptance" and "Claim Reimbursement" can be changed to "Red Check", but "Red Check" cannot be changed to other statuses. At the same time, once the status is "Reimbursement Completed", it cannot be changed to other statuses.

[0150] Therefore, in this embodiment, the traceability smart contract verifies whether the current electronic invoice status meets the update conditions. If the current invoice status is "red cancellation" or "reimbursement completed", it is considered that the current electronic invoice status does not meet the update conditions and cannot be updated, and failure is directly returned; otherwise, it is considered that the current electronic invoice status meets the update conditions, the electronic invoice status is updated, and the success result of the operation is returned to the caller.

[0151] In this embodiment, smart contracts enable automated management of the medical electronic invoice state machine. A strict flow logic is established based on pre-set invoice lifecycle states (normal invoicing, red write-off, return, insurance acceptance, claim reimbursement, and reimbursement completion). The "red write-off" state prohibits reverse operations to ensure the irreversibility of financial write-offs, while the "reimbursement completion" state locks the invoice's end of circulation. The electronic invoice state machine model replaces manual review with automated verification through smart contracts, preventing illegal state transitions (such as the tampering and reuse of reimbursed invoices) and recording the caller's signature and timestamp of each state change through the blockchain, forming a complete audit trail.

[0152] Furthermore, to ensure the integrity and auditability of updated data, the traceability smart contract automatically performs the following operations through the iterator each time a bill status update operation is executed:

[0153] The digital signature of the blockchain node that records the caller;

[0154] Record update operation timestamp;

[0155] Records the updated ticket status.

[0156] Through the above-mentioned tracing mechanism of bill update records, the update history of the bill can be traced in chronological order or by the digital signature of the caller. This not only improves the transparency of the bill status change process, but also provides technical support for subsequent scenarios.

[0157] It's important to note that an iterator is a tool within smart contracts, used to sequentially access elements in a collection, rather than a physical "machine." In smart contracts, iterators are often used to traverse on-chain data collections, such as arrays and mappings. Given the limited storage and computing resources in blockchain environments, using iterators allows for sequential access to elements in a collection, avoiding the need to load the entire collection all at once. This effectively reduces resource consumption and is particularly crucial when processing large-scale data queries.

[0158] In this embodiment, the operation on the medical electronic receipt also includes a receipt information query operation, which further includes:

[0159] As the caller's blockchain node, it provides bill information query request data to the traceability smart contract;

[0160] The traceability smart contract queries the relevant information of medical electronic receipts based on the receipt information query request data, and returns the query results to the blockchain node.

[0161] Furthermore, the bill information query operation includes a bill basic information query operation and a bill history update information query operation.

[0162] For the bill basic information query operation, the bill information query request data is the bill basic information query request data. The execution process of the traceability smart contract includes the following steps:

[0163] The blockchain node acting as the caller provides the bill basic information query request data to the traceability smart contract, wherein the bill basic information query request data includes at least the bill identification key;

[0164] The traceability smart contract queries the basic information of medical electronic receipts based on the receipt identification key and returns the query results to the blockchain node that is the caller.

[0165] For the bill history update information query operation, the bill information query request data is the bill history update information query request data. The execution process of the traceability smart contract includes the following steps:

[0166] The blockchain node acting as the caller provides the bill history update information query request data to the traceability smart contract, wherein the bill history update information query request data includes at least the bill identification key and the digital signature;

[0167] The traceability smart contract traverses and queries all historical update information related to medical electronic invoices based on the invoice identification key to obtain query results, and returns the query results to the blockchain node as the caller.

[0168] More specifically, the traceability smart contract uses an iterator to traverse all historical update information related to the above-mentioned bill identification key and digital signature, and returns the following content in chronological order:

[0169] The caller information for each update;

[0170] The corresponding update timestamp;

[0171] Ticket status value.

[0172] The present invention supports the visual backtracking of the entire bill life cycle through the bill history update information query function, providing a reliable basis for intelligent supervision, risk warning, etc.

[0173] In this embodiment, before uploading, updating, or querying a receipt, the image data of the medical electronic receipt is pre-processed to ensure image quality, data security, and subsequent verifiability.

[0174] Figure 3 A flowchart of image data preprocessing according to an embodiment of the present invention is disclosed. Figure 3 As shown, various operations on medical electronic receipts also include image data preprocessing:

[0175] The image data preprocessing process includes image enhancement processing, image encryption processing and image decryption processing.

[0176] The methods for obtaining medical electronic receipt images uploaded by users may include taking photos with a mobile phone, scanning, or directly uploading the original image. For the above situations, image enhancement processing is required before performing the receipt upload operation.

[0177] It should be noted that image enhancement is not a necessary step. When the original image quality meets the requirements, image encryption can be performed directly. The flexible design of this preprocessing process not only ensures the security and integrity of the bill image, but also avoids unnecessary processing overhead.

[0178] Figure 4 A flowchart of an image enhancement process according to an embodiment of the present invention is disclosed. Figure 4 As shown, performing image enhancement processing on the image of the medical electronic receipt further includes:

[0179] Step S311, performing uniformity analysis on the image background color based on a color clustering algorithm to determine whether there is color difference in the image background;

[0180] Step S312: analyzing the image edge clarity based on an edge detection algorithm to determine whether the image structure is complete;

[0181] Step S313: If the image background color difference or the image edge clarity does not meet the specified requirements, image enhancement processing is performed, and the image enhancement processing includes operations such as median filtering, Laplace sharpening and image segmentation.

[0182] In step S311, the K-means color clustering algorithm is further used to analyze the color distribution of the image to identify the uniformity of the image background color. This method extracts the main color information in the image through clustering and determines whether there is a large color difference or noise interference in the background area.

[0183] Specifically, the K-means color clustering algorithm further includes the following steps:

[0184] First, K-means clustering is performed on the pixel colors in the image to divide all pixels into several color clusters, each cluster represents a main color;

[0185] Then, by analyzing the color differences between clusters, we determine the uniformity of the image background color. If the color differences between clusters are small, it indicates that the background color is relatively uniform; conversely, if the color differences between clusters are large, there may be obvious color difference or noise, and the background color is uneven.

[0186] To further quantify the uniformity of the background color, this embodiment introduces the standard deviation of the background color as a judgment indicator.

[0187] Set a first preset threshold (for example, 0.1 to 0.2), if the background color standard deviation σ background If the background color is lower than or equal to the first preset threshold, it can be judged that the background color is uniform and no enhancement processing is required; otherwise, the background color standard deviation σ background If the value is higher than the first preset threshold, subsequent image enhancement operations are performed.

[0188] The standard deviation of the background color σ background , the specific calculation formula is:

[0189]

[0190] Where N is the total number of pixels in the background area, R i G i B i is the RGB value of the i-th background pixel, μ R μ G μ B is the mean of the red, green, and blue components in the background area.

[0191] The standard deviation is an indicator to measure the degree of dispersion of color distribution. The smaller the value, the more concentrated the color and the more uniform the background; the larger the value, the greater the background color variation and the presence of obvious interference.

[0192] In this embodiment, step S312 further includes:

[0193] Use the Canny edge detection algorithm to extract the edges of the image.

[0194] The Canny edge detection algorithm is an efficient edge detection method widely used in the field of image processing. The specific processing flow includes the following steps:

[0195] First, a Gaussian filter is used to smooth the image to reduce the interference of image noise on edge recognition;

[0196] Secondly, the gradient strength and direction of each pixel in the image are calculated to identify the image boundary;

[0197] Then, non-maximum suppression is applied to eliminate the spurious responses caused by edge detection and enhance the positioning accuracy of edge lines;

[0198] Finally, through dual threshold detection and edge connection operations, the real edge pixels in the image are accurately determined.

[0199] In this embodiment, the Canny edge detection algorithm is used to extract image edge pixel information and quantitatively evaluate edge clarity. Specifically, the number of edge pixels in the image is counted and the ratio of the number of edge pixels to the total number of pixels in the image is calculated as the basis for measuring image edge clarity.

[0200] If the number of edge pixels in the image exceeds a second preset threshold (e.g., 20% of the total number of pixels in the image), the image structure is considered to be relatively clear and no image enhancement processing is required; conversely, if the number of edge pixels is lower than the second preset threshold, it indicates that the image structure is incomplete or the edges are blurred, and the image enhancement process is performed to improve the overall image quality.

[0201] By analyzing features such as background color uniformity and edge clarity, the image is judged to determine whether image enhancement is necessary. If the image quality is good, with both uniformity and edge clarity meeting the requirements, then no enhancement is required. If the image quality is poor, with either uniformity or edge clarity failing to meet the requirements, then step S313 is performed for image enhancement.

[0202] Step S313 specifically includes the following processing flow:

[0203] Median filtering: Perform median filtering on the image to effectively remove random noise in the image, improve image cleanliness, and enhance the consistency of the image background;

[0204] Laplace sharpening: Uses the Laplace filtering algorithm to enhance the edges and details of the image, highlighting key structural information such as text and lines, and improving overall image clarity;

[0205] Image segmentation processing: Based on the distribution characteristics of pixel values in the bill image, a threshold segmentation algorithm is applied to accurately extract the bill information area from the background to improve the accuracy of subsequent information recognition and image comparison.

[0206] In this embodiment, image threshold segmentation can be achieved using conventional pixel histogram analysis methods, combined with either a fixed threshold method or an adaptive threshold method for pixel region segmentation. Because specific image environments and deployment scenarios may vary, the selection and parameter setting of the threshold segmentation algorithm can be flexibly adjusted based on actual application requirements. Therefore, this embodiment does not require detailed explanation of the image segmentation algorithm.

[0207] In order to ensure the data security and privacy of medical electronic receipts during uploading, storage and circulation, in this embodiment, the medical electronic receipt images are encrypted.

[0208] Figure 5The image encryption process flow chart according to one embodiment of the present invention is disclosed. Figure 5 As shown, the steps of performing image encryption processing on the image of the medical electronic receipt specifically include the following process:

[0209] Step S321, performing block processing on the image data;

[0210] Step S322, encrypting each image block;

[0211] Step S323, merging all block ciphertexts;

[0212] Step S324: Generate image encryption metadata.

[0213] In this embodiment, step S321 further includes:

[0214] The image data of the medical electronic receipt is divided into blocks, the image is encoded into multiple image blocks according to a fixed byte length, and the last block is padded to meet the encryption requirements.

[0215] In this embodiment, the AES encryption algorithm is used for encryption. Since the AES encryption algorithm is a symmetric block encryption algorithm that requires the input data to be an integer multiple of 16 bytes, the image binary data is segmented into 16-byte blocks.

[0216] If the total length of the image data is not an integer multiple of 16 bytes, the PKCS#7 padding method is used for the last block to ensure that its padded length meets the encryption requirements.

[0217] PKCS#7 is a commonly used block cipher padding standard that is suitable for scenarios where the block size is 1 to 255 bytes.

[0218] In this embodiment, the specific implementation of the PKCS#7 padding algorithm is as follows:

[0219] If the last block is missing N bytes, N bytes are added to the end. The padding value of each byte can be 0xN.

[0220] For example, if the last chunk is missing 5 bytes, 5 bytes are added to the end, and the padding value of each byte is 0x05.

[0221] If the original data is an integer multiple of 16 bytes, a new complete block (16 bytes) is added, and the padding value of each byte is 0x16, so that the padding data can be correctly identified and removed during decryption to restore the original data.

[0222] In this embodiment, step S322 further includes:

[0223] Each image block is encrypted separately based on a symmetric encryption algorithm to obtain multiple ciphertext blocks.

[0224] Use the AES encryption algorithm to encrypt each image block to obtain the corresponding ciphertext block, namely:

[0225] C i =E s (M i );

[0226] Among them, C i is the ith ciphertext block, M i refers to the i-th image block, E s It is the AES encryption algorithm;

[0227] In this embodiment, step S323 further includes:

[0228] All ciphertext blocks are concatenated in numerical order to form a merged ciphertext, and delimiters are set to mark the block boundaries.

[0229] All encrypted ciphertexts are divided into blocks and concatenated in numerical order to form a complete encrypted string. Special delimiters (such as "||") are used to indicate the boundaries between blocks, which are used for block identification during decryption:

[0230] C=C1||C2...||C n ;

[0231] Among them, C n is the nth ciphertext block, and C is the merged ciphertext.

[0232] In this embodiment, step S324 further includes:

[0233] Construct structured data containing the merged ciphertext, the total number of blocks and the encrypted symmetric encryption key, and encrypt the structured data based on the hash algorithm to generate bill image encryption metadata.

[0234] Specifically, the AES key is encrypted using the caller's private key;

[0235] Use the combined ciphertext C, the total number of blocks n, and the encrypted AES key to construct structured data;

[0236] Perform hash encryption processing on the structured data to generate encrypted metadata of the bill image.

[0237] Through the above encryption steps, the data privacy, transmission security and verifiability of medical electronic receipt images during blockchain upload and smart contract invocation are ensured, effectively preventing data leakage, tampering or illegal access.

[0238] When querying bill information and requesting to obtain medical electronic bill image information, the bill image encrypted metadata stored on the blockchain is decrypted to restore the visible image content.

[0239] Figure 6 A flowchart of an image decryption process according to an embodiment of the present invention is disclosed. Figure 6 As shown in the figure, the image decryption processing is performed on the encrypted metadata of the bill image, which specifically includes the following processes:

[0240] Step S331: decrypt the encrypted metadata of the bill image to obtain the combined ciphertext C, the total number of blocks n, and the AES symmetric encryption key encrypted with the public key;

[0241] Step S332: Split the combined ciphertext C into multiple image ciphertext blocks C according to the set delimiter. i ;

[0242] Step S333: decrypt the encrypted AES symmetric encryption key using the private key to obtain the AES symmetric encryption key used to encrypt the original image;

[0243] Step S334: Use the AES symmetric encryption key to encrypt the image ciphertext into blocks C. i Decrypt one by one to restore the original image block data;

[0244] Step S335 , merging the decrypted image block data in sequence to form a complete image byte stream;

[0245] Step S336: Use an image decoder to decode the image byte stream into an image format, and generate a visible image for user access.

[0246] The above-mentioned image decryption process ensures that medical electronic receipt images have a high degree of data privacy protection during query and use. Combined with the user authority control mechanism, it prevents image data from being illegally accessed, maliciously tampered with or leaked during transmission and use, thereby ensuring the security and credibility of the system.

[0247] In order to realize the above-mentioned blockchain-based full-process management method of medical electronic invoices, the present invention also proposes a blockchain-based full-process management system for medical electronic invoices.

[0248] The present invention proposes a blockchain-based full-process management system for medical electronic invoices, which includes several front-end modules and a central system:

[0249] The plurality of front-end modules are used to perform various operations on medical electronic receipts;

[0250] The central system is used to deploy and execute the identity chain smart contract and the traceability smart contract;

[0251] The front-end module and the central system work together to realize the full-process management method of medical electronic invoices based on blockchain.

[0252] In this embodiment, the plurality of front-end processor modules include a first front-end processor module deployed in a hospital and a second front-end processor module deployed in an insurance company;

[0253] The first front-end module is used to perform operations such as bill uploading, bill status updating, and bill information query;

[0254] The second front-end module is used to perform operations such as bill status update and bill information query.

[0255] Specifically, the blockchain-based full-process management system for medical electronic invoices proposed in this invention mainly involves the following three roles:

[0256] The first front-end module deployed in the hospital is responsible for uploading and updating electronic medical bills. During upload, the complete bill information is transmitted to the central system. During update, the status of unreimbursable bills is changed to red-check status.

[0257] The second front-end module deployed at the insurance company is responsible for updating bill information. After the hospital uploads the bill, it can be changed to insurance acceptance, claim reimbursement, refund, or reimbursement completion status based on the bill's circulation status.

[0258] The central system verifies the identity of users who upload or update invoices, collects and compiles invoice information, encrypts uploaded electronic invoice images, and uploads key invoice information and encrypted metadata to the blockchain. It also compiles statistics on invoice processing by hospitals and insurance companies and displays them on the front-end system.

[0259] Figure 7 The full-link diagram of the full process management of medical electronic bills according to an embodiment of the present invention is disclosed. Figure 7 The functional architecture of the full-process management system for medical electronic invoices shown in the figure is divided into an infrastructure layer, a front-end service layer, a blockchain layer, a central service layer, and a display layer. These layers interact through data to implement functions such as invoice upload, encryption and decryption, status updates, and visualization. The infrastructure layer is the hardware, while the other layers are software services. Except for the front-end service layer, all other layers are deployed locally at the service provider.

[0260] At the infrastructure level, the system deploys front-end processors (FEPs) and central servers. The FEPs are hardware facilities installed locally at users such as hospitals and insurance companies, while the central servers are hardware facilities deployed in the service provider's data center, serving as the system's core computing and storage nodes.

[0261] The front-end service layer primarily handles identity registration, authentication, bill upload, bill status update, and query. Hospitals or insurance companies upload collected bill images and key information via the front-end to complete the bill upload process. The front-end can also update bill status during subsequent business processes and support bill query functionality.

[0262] The blockchain layer includes two core smart contract modules: the identity contract and the provenance smart contract. The identity contract is responsible for completing identity registration and authentication, ensuring the uniqueness and legitimacy of each participant's identity. The provenance smart contract implements bill notarization, bill verification, bill information updates, and historical information query functions, ensuring the integrity and immutability of bill data.

[0263] The central service layer implements the encryption and decryption of receipt images and also provides back-end support for receipt uploads and updates. It also includes receipt statistics, providing data support for front-end display. Receipt information uploaded by hospitals or insurance companies via the front-end processor is first encrypted in the central service. After the data is uploaded, if a query is requested, the image decryption module is invoked to decrypt and restore the receipt image.

[0264] The presentation layer uses the presentation platform to visualize the status, historical trajectory, and statistical information of bills throughout their life cycle, allowing users to view and track the processing progress and flow path of each bill in real time.

[0265] Figure 7 The data interaction paths between the functional modules are marked in detail by arrows, forming a complete data closed loop from bill generation to upload, and then to status update and information display, ensuring the security, traceability and efficiency of the medical electronic bill management system.

[0266] Based on the above-mentioned medical electronic bill full-process management system, the present invention provides the following specific implementation plans:

[0267] During the initial deployment phase, each blockchain node in the consortium chain (including hospitals and insurance companies) must complete identity initialization. Each node will be registered and authenticated within the consortium chain, generating its own digital certificate, private key, and digital identity.

[0268] In the consortium chain system, the identity registration process includes writing the public key, digital identity and related information of each blockchain node into the on-chain identity library to ensure that the identity of each participant can be uniquely and accurately identified.

[0269] The identity authentication process is to confirm the legitimacy of the participant's identity by verifying the public key and digital identity, thereby preventing malicious identity disguise and ensuring the credibility of the data source on the chain.

[0270] The hospital's first front-end module is integrated with the hospital's business system to collect the original image and related element field information of the medical electronic receipt (such as patient name, hospital name, invoice time, invoice amount, etc.), and upload it to the central system to achieve traceability of the source of the invoice.

[0271] In the insurance company's second front-end module, the real-time status of the bill is updated according to the business status of the bill during circulation, including "insurance acceptance", "claim reimbursement" and "refund".

[0272] "Reimbursement completed", etc., and uploaded to the central system simultaneously.

[0273] In terms of blockchain system design, hospitals and insurance companies, as member nodes of the alliance chain, must verify their permissions through the identity authentication mechanism when uploading medical electronic receipts. The smart contracts deployed by the system include: the identity chain smart contract, which is used to verify the identity of the uploader;

[0274] The traceability smart contract is used to record and verify the entire process of bill upload and status changes.

[0275] All uploaded bill information must conform to the field format specified by the smart contract, otherwise the upload will be rejected to ensure data structure consistency and verifiability.

[0276] To protect the privacy of receipt images, an image encryption mechanism has been introduced. When a hospital uploads a receipt image, the central system automatically processes it using an image encryption algorithm, generating encrypted metadata for the receipt image. When a user requests access to query the receipt image, the central system uses a decryption algorithm to restore the encrypted metadata, ensuring secure image transmission and access control.

[0277] After completing the smart contract joint debugging test and image encryption and decryption algorithm verification, complete the deployment of the blockchain system in the central system, write the image encryption and decryption algorithm, write the back-end service based on the smart contract and image algorithm, write the front-end service based on user needs, and deploy the front-end and back-end services in the central system.

[0278] The bill upload process is as follows:

[0279] The hospital uploads the medical electronic receipt information through the first front-end module, including the original image of the electronic receipt and the associated element field information of the receipt. After the upload is successful, the receipt status is automatically set to "invoiced";

[0280] At the same time, based on the business status, after issuing the invoice, the hospital can also update the invoice status to "red check". After changing to "red check", the life cycle of a single electronic invoice is completed.

[0281] The bill circulation process is as follows:

[0282] The insurance company obtains the bill information uploaded by the hospital through the second front-end module and updates the bill status through the second front-end module according to the business status, such as "insurance accepted", "claim reimbursement", "refund" or "reimbursement completed".

[0283] After the insurance company changes the bill status to "reimbursement completed", the life cycle of a single electronic bill is completed.

[0284] In addition, the system provides a visual front-end that supports real-time viewing of the latest status of each bill, historical status change records, and overall statistical information through the front-end web page.

[0285] To protect information security and privacy, the back-end system controls data access permissions and isolates data:

[0286] Insurance companies can only obtain bill images through offline channels and do not have the authority to view bill information online;

[0287] A single hospital or insurance company can only view the bill information uploaded or processed by itself and is not allowed to view the bill information of other organizations.

[0288] Since the specific implementation method, functional modules and technical means of the blockchain-based medical electronic invoice full-process management system proposed in the present invention correspond to the aforementioned blockchain-based medical electronic invoice full-process management method, and this method has been fully explained in the previous embodiments, the smart contract execution logic, data interaction process, authority control mechanism and security protection measures involved in this system can all refer to the specific description of the aforementioned method part, and will not be repeated here.

[0289] Those skilled in the art can implement the complete functions and applications of the system based on the detailed description of the method part and in combination with the system architecture design.

[0290] The present invention proposes a blockchain-based full-process management method and system for medical electronic invoices. By putting the entire circulation process of medical electronic invoices on the chain and verifying the identity of the operator, the information richness of the circulation process of medical electronic invoices is improved, the operational process of information storage is simplified, and the traceability and controllability of each stage of the invoice circulation are improved.

[0291] The present invention provides a blockchain-based full-process management method and system for medical electronic invoices. Front-end processor modules can be deployed locally at hospitals, insurance companies, and regulatory authorities to independently collect invoice status information and upload it to a central system in encrypted form. The front-end processors at hospitals, insurance companies, and regulatory authorities each handle operations such as invoice issuance, insurance reimbursement, and medical insurance settlement. The central system, based on blockchain, uniformly handles the entire process, enabling isolated data collection and complete traceability of the invoice lifecycle. This addresses the existing issue of fragmented and disconnected data among hospitals, insurance companies, and regulatory authorities.

[0292] The present invention provides a blockchain-based full-process management method and system for medical electronic invoices, which has the following beneficial effects:

[0293] 1) Enhance the trustworthy management capabilities of medical electronic invoice information throughout the entire process: Leveraging the immutability of blockchain, complete invoice information is uploaded to the chain, and smart contracts are used to record changes in the status of electronic invoices throughout their life cycle, ensuring the authenticity, reliability, and traceability of invoice data. This effectively enhances the effectiveness of supervision and auditing, and provides comprehensive data support for subsequent business processing and management.

[0294] 2) Improve cross-institutional data flow efficiency and collaborative processing capabilities: Through smart contracts, medical electronic bill data can be shared among multiple parties such as hospitals, insurance institutions, and regulatory authorities. This automates the review, reimbursement, and regulatory processes, significantly reducing manual operation and communication costs, and significantly improving system operation efficiency and cross-institutional collaboration capabilities.

[0295] 3) Ensure the controllability and information security of medical bill data during circulation: Through image encryption and decryption technology and identity chain smart contract technology, bill image information is encrypted and processed, combined with identity authority to control access, to ensure that information is not illegally accessed and tampered with during the bill circulation process, avoid sensitive information leakage, and effectively improve the security and privacy protection capabilities of the system;

[0296] 4) Enhance the scalability and compatibility of the system: Adopting a consortium chain architecture, it supports flexible access to multiple medical information systems, bill recognition systems and third-party data platforms, facilitating subsequent upgrades and functional expansion, and has good openness and maintainability.

[0297] Although the above methods are illustrated and described as a series of acts for simplicity of explanation, it is to be understood and appreciated that these methods are not limited by the order of the acts, as some acts may occur in a different order and / or concurrently with other acts from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art according to one or more embodiments.

[0298] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.

[0299] Those skilled in the art will appreciate that information, signals, and data may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips cited throughout the foregoing description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0300] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. A skilled person may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0301] The various illustrative logic modules and circuits described in conjunction with the embodiments disclosed herein may be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0302] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read and write information from / to the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and storage medium may reside in a user terminal as discrete components.

[0303] The above embodiments are provided to persons familiar with the art for implementing or using the present invention. Personnel familiar with the art may make various modifications or changes to the above embodiments without departing from the inventive concept of the present invention. Therefore, the scope of protection of the present invention is not limited to the above embodiments, but should be the maximum scope of the innovative features mentioned in the claims.

Claims

1. A full-process management method for medical electronic bills based on blockchain, characterized in that: The blockchain is a consortium chain, and the method includes the following steps: Blockchain nodes perform identity registration and authentication based on the identity chain smart contract deployed on the consortium chain; Blockchain nodes execute various operations on medical electronic receipts based on the traceability smart contract deployed on the alliance chain; The identity chain smart contract verifies the identity authority of the blockchain node that performs the operation of the medical electronic bill; The various operations on medical electronic receipts include at least a receipt upload operation or a receipt status update operation; The bill uploading operation includes uploading bill image information and associated element field information; The bill status update operation includes modifying the electronic bill status to a preset status according to the bill life cycle.

2. The blockchain-based full-process management method for medical electronic invoices according to claim 1 is characterized in that: The identity chain smart contract contains at least the following fields: digital identity, public key, identity metadata, update time, verification status, identity verification person, and digital signature; The blockchain node performs identity registration based on the identity chain smart contract deployed on the alliance chain, further comprising: Blockchain nodes, which provide public keys, identity metadata, and identity verification to the IdentityChain smart contract; The identity chain smart contract generates a digital identity based on the public key, identity metadata and identity verification person, hashes the public key to obtain the public key hash value, generates the update time, digital signature and initial verification status, and returns the digital identity to the blockchain node.

3. The blockchain-based full-process management method for medical electronic invoices according to claim 2 is characterized in that: The blockchain node performs identity authentication based on the identity chain smart contract deployed on the consortium chain, further comprising: Blockchain nodes, providing public keys and digital identities to the Identity Chain smart contract; The identity chain smart contract looks up identity information based on the digital identity, hashes the provided public key, verifies the matching of the public key hash value, and updates the verification status.

4. The blockchain-based full-process management method for medical electronic invoices according to claim 1 is characterized in that: The traceability smart contract contains at least the following fields: Ticket identification key, associated element field information, ticket image encryption metadata, and digital signature; The bill uploading operation further includes: The blockchain node provides the bill upload data to the traceability smart contract, wherein the bill upload data includes at least a digital signature, associated element field information, and bill image encryption metadata; The traceability smart contract performs hash encryption based on the associated element field information to generate a bill identification key, uses the bill identification key as the primary key, uploads the bill data to the chain, and returns the bill identification key to the blockchain node after the chain is successfully uploaded.

5. The blockchain-based full-process management method for medical electronic invoices according to claim 4 is characterized in that: The traceability smart contract uses a hash algorithm to encrypt and desensitize the sensitive information in the associated element field information.

6. The blockchain-based full-process management method for medical electronic invoices according to claim 4 is characterized in that: The traceability smart contract also includes the following fields: electronic bill status; The ticket status update operation further includes: The blockchain node provides bill update data to the traceability smart contract, wherein the bill update data includes at least a digital signature, an electronic bill status, and a bill identification key; The traceability smart contract verifies whether the current electronic bill status meets the update conditions. If so, the electronic bill status is updated. If not, it cannot be updated and failure is returned directly.

7. The blockchain-based full-process management method for medical electronic invoices according to claim 6 is characterized in that: The electronic bill status includes the following preset states according to the bill life cycle: Normal invoicing, red cancellation, refund, insurance acceptance, claim reimbursement and reimbursement completion; If the current electronic invoice status is red cancellation or reimbursement completed, it is considered that the update conditions are not met.

8. The blockchain-based full-process management method for medical electronic invoices according to claim 6 is characterized in that: The traceability smart contract automatically performs the following operations through the iterator when executing the bill status update: The digital signature of the blockchain node that records the caller; Record update operation timestamp; Records the updated ticket status.

9. The blockchain-based full-process management method for medical electronic invoices according to claim 4 is characterized in that: The various operations on medical electronic receipts also include bill information query operations; The bill information query operation further includes: Blockchain nodes provide bill information query request data to the traceability smart contract; The traceability smart contract queries the relevant information of medical electronic receipts based on the receipt information query request data, and returns the query results to the blockchain node.

10. The blockchain-based full-process management method for medical electronic invoices according to claim 9 is characterized in that: The bill information query operation includes at least a bill basic information query operation and a bill history update information query operation; When performing a basic bill information query operation, the bill information query request data includes at least a bill identification key, and the traceability smart contract queries the basic information of the medical electronic bill to obtain a query result; When executing the bill history update information query operation, the bill information query request data includes at least the bill identification key and digital signature, and the traceability smart contract traverses and queries all historical update information related to the medical electronic bill to obtain the query results.

11. The blockchain-based full-process management method for medical electronic invoices according to claim 1 is characterized in that: The various operations on the medical electronic receipts also include image enhancement processing on the images of the medical electronic receipts; The step of performing image enhancement processing on the image of the medical electronic receipt further includes: Perform uniformity analysis on the image background color based on the color clustering algorithm to determine whether there is color difference in the image background; Analyze the image edge clarity based on the edge detection algorithm to determine whether the image structure is complete; If the image background color difference or the image edge clarity does not meet the specified requirements, an image enhancement process is performed, wherein the image enhancement process at least includes median filtering, Laplacian sharpening and image segmentation processing.

12. The blockchain-based full-process management method for medical electronic invoices according to claim 1 or claim 4 is characterized in that: The various operations on the medical electronic receipts also include image encryption processing of the medical electronic receipt images; The step of performing image encryption processing on the image of the medical electronic receipt further includes: The image data of the medical electronic receipt is divided into blocks, the image is encoded into multiple image blocks according to a fixed byte length, and the last block is padded to meet the encryption requirements; Encrypt each image block separately based on the symmetric encryption algorithm to obtain multiple ciphertext blocks; Concatenate all ciphertext blocks in numerical order to form a combined ciphertext, and set delimiters to mark block boundaries; Construct structured data containing the merged ciphertext, the total number of blocks and the encrypted symmetric encryption key, and encrypt the structured data based on the hash algorithm to generate bill image encryption metadata.

13. The blockchain-based full-process management method for medical electronic invoices according to claim 12 is characterized in that: The various operations on medical electronic receipts also include image decryption processing of encrypted metadata of receipt images; The step of performing image decryption processing on the image of the medical electronic receipt further includes: Decrypt the encrypted metadata of the bill image to obtain the combined ciphertext, the total number of blocks, and the encrypted symmetric encryption key; Split the merged ciphertext into multiple image ciphertext blocks according to the set delimiter; Decrypting the encrypted symmetric encryption key to obtain the symmetric encryption key used to encrypt the original image; Decrypting the image ciphertext blocks one by one using the symmetric encryption key to restore the original image block data; Merge the decrypted image block data in sequence to form a complete image byte stream; The image byte stream is decoded into an image format to generate a visible image for user access.

14. A blockchain-based full-process management system for medical electronic bills, characterized by: Includes several front-end modules and central systems: The plurality of front-end modules are used to perform various operations on medical electronic receipts; The central system is used to deploy and execute the identity chain smart contract and the traceability smart contract; The plurality of front-end modules and the central system work together to implement the blockchain-based full-process management method for medical electronic invoices as described in any one of claims 1 to 13.

15. The blockchain-based medical electronic bill full-process management system according to claim 14 is characterized in that: The plurality of front-end processor modules include a first front-end processor module disposed in a hospital and a second front-end processor module disposed in an insurance company; The first front-end module is used to perform bill upload operations, bill status update operations, and bill information query operations; The second front-end module is used to perform ticket status update operations and ticket information query operations.

Citation Information

Patent Citations

  • Risk assessment method and system for financing customer based on block chain

    CN119006146A

Cited By

  • Block chain-based invoice intelligent management system and method

    CN121258617A

  • Electronic bill state management and control system and method based on smart contract

    CN121329410A

  • Electronic bill mutual identification verification system and method based on data sharing

    CN121526589A