Medical data analysis method and equipment
By performing message event analysis and target FHIR medical resource analysis rules on FHIR format medical information packets, the popularization barriers caused by FHIR complexity and technical requirements are solved, and reliable analysis of FHIR data and understanding of non-professional personnel are realized. .
Patent Information
- Application Number
- CN202411491103.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the complexity and technical requirements of FHIR have obstacles to its popularity among non-professional medical personnel, especially for message data in FHIR, only professionals can understand it.
Provide a medical data analysis method, by obtaining medical information packets in FHIR format, performing message event analysis, determining the event code of the target message event, and determining the target FHIR medical resource analysis rules from the preset resolution rule database based on the event code, This rule is used to analyze the packets to obtain structured FHIR medical resource resource data.
It realizes reliable and accurate analysis of FHIR medical information packets, so that non-professional personnel can also understand the analysis results, lowers the learning threshold of FHIR, and improves the visualization effect of data.
Smart Images

Figure CN119484669A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method and apparatus for medical data analysis. Background Technology
[0002] In modern medical practice, data exchange and data standardization are core to ensuring efficient healthcare services. FHIR (Fast Healthcare Interoperability Resources), as a web-based standard for exchanging medical information, aims to promote data interoperability between different healthcare information systems.
[0003] In related technologies, the application of FHIR is still in its early stages. Especially for non-medical professionals, the complexity and technical requirements of FHIR present obstacles to its widespread adoption. Only professionals can understand the message data in FHIR; non-professionals find it difficult to comprehend. Summary of the Invention
[0004] The purpose of this application is to provide a medical data analysis method and device to address the shortcomings of the prior art and solve the aforementioned technical problems in the related technologies.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, embodiments of this application provide a medical data parsing method, including:
[0007] Acquire medical information messages in FHIR format from rapid medical interoperability resources;
[0008] The medical information message is parsed to obtain the event code of the target message event corresponding to the medical information message;
[0009] Based on the event code of the target message event, determine the target FHIR medical resource parsing rule that matches the target message event from the preset parsing rule database;
[0010] The medical information message is parsed using the target FHIR medical resource parsing rules to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
[0011] Optionally, the step of parsing the medical information message to obtain the event code of the target message event corresponding to the medical information message includes:
[0012] Convert the medical information message into a target data object;
[0013] From the target data object, determine the target element resource whose element resource type is message header;
[0014] The event code of the target element resource is parsed to obtain the event code of the target message event.
[0015] Optionally, determining the target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database based on the event code of the target message event includes:
[0016] Based on the event code of the target message event and the preset parsing rule database, determine the target message event scheme that matches the target message event;
[0017] Based on the target resource model in the target message event scheme, the target FHIR medical resource parsing rules are determined, wherein the target resource model is used to indicate the medical resources associated with the target message event and the medical resource parsing rules.
[0018] Optionally, the target message event includes: at least two preset message event schemes; the step of determining the target message event scheme matching the target message event based on the event code of the target message event and the preset parsing rule database includes:
[0019] Determine the first number of attributes of medical resources in each of the preset message event schemes;
[0020] Based on the event code of the target message event, determine the second number of attributes of medical resources in the preset parsing rule database in each preset message event scheme;
[0021] Based on the first quantity, the second quantity, and the number of medical resources in the preset message event scheme, determine the matching degree of at least two preset message event schemes;
[0022] The target message event scheme is determined based on the matching degree of at least two preset message event schemes.
[0023] Optionally, before determining the target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database based on the event code of the target message event, the method further includes:
[0024] In response to the input configuration operation, obtain the event codes of multiple preset message events and the preset medical resources corresponding to each preset message event event code;
[0025] Based on the event codes of the multiple preset message events, the preset medical resources corresponding to the event codes of each preset message event, and the preset data dictionary, the preset parsing rule database is constructed.
[0026] The preset data dictionary includes the preset medical resource type, preset medical resource attribute, and preset medical resource parsing rules corresponding to the preset medical resource.
[0027] Optionally, the step of parsing the medical information message using the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message includes:
[0028] Based on the message syntax characteristics of the FHIR format and the preset breadth-first search algorithm, a preset FHIR resource parsing algorithm is constructed.
[0029] According to the preset FHIR resource parsing algorithm and the target FHIR medical resource parsing rule, the medical information message is parsed to obtain the resource data of at least one FHIR medical resource corresponding to the medical information message.
[0030] Optionally, the step of parsing the medical information message according to the preset FHIR resource parsing algorithm and the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message includes:
[0031] According to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules and the preset programming language reflection mechanism are used to parse the resource attributes of the medical information message to obtain the resource object, resource attribute, value of the resource attribute and resource keyword of the at least one FHIR medical resource. The resource keyword is used to indicate the position of the element corresponding to the corresponding FHIR medical resource in the medical information message.
[0032] Optionally, the method further includes:
[0033] The resource data of the at least one FHIR medical resource is encapsulated into structured resource data;
[0034] Based on the structured resource data, the resource parsing results of the preset data display mode are rendered and displayed on the preset visualization page.
[0035] Optionally, rendering and displaying the resource parsing results in a preset data format on a preset visualization page based on the structured resource data includes:
[0036] Based on the structured resource data, the resource parsing results are rendered and displayed in the form of charts on a preset visualization page;
[0037] Alternatively, based on the resource hierarchy and resource relationships in the structured resource data, the tree-structured resource parsing results can be rendered and displayed on the preset visualization page.
[0038] Secondly, embodiments of this application also provide a medical data parsing device, including: a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the medical data parsing method described in any one of the first aspects.
[0039] Thirdly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when read and executed, implements the medical data parsing method described in any of the first aspects above.
[0040] Fourthly, embodiments of this application also provide a medical data analysis device, comprising:
[0041] The first acquisition module is used to acquire medical information messages in FHIR format from rapid medical interoperability resources;
[0042] The first parsing module is used to parse the medical information message into a message event to obtain the event code of the target message event corresponding to the medical information message.
[0043] The determination module is used to determine the target FHIR medical resource parsing rule that matches the target message event from a preset parsing rule database based on the event code of the target message event;
[0044] The second parsing module is used to parse the medical information message using the target FHIR medical resource parsing rules to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
[0045] Optionally, the first parsing module is specifically used to convert the medical information message into a target data object; determine the target element resource with the element resource type of message header from the target data object; and perform event code parsing on the target element resource to obtain the event code of the target message event.
[0046] Optionally, the determining module is specifically configured to determine a target message event scheme matching the target message event based on the event code of the target message event and the preset parsing rule database; and to determine the target FHIR medical resource parsing rule based on the target resource model in the target message event scheme, wherein the target resource model is used to indicate the medical resources associated with the target message event and the medical resource parsing rule.
[0047] Optionally, the target message event includes: at least two preset message event schemes; the determining module is specifically used to determine a first number of attributes of medical resources in each preset message event scheme; determine a second number of attributes of medical resources in the preset parsing rule database in each preset message event scheme according to the event code of the target message event; determine the matching degree of at least two preset message event schemes according to the first number, the second number, and the number of medical resources in the preset message event schemes; and determine the target message event scheme according to the matching degree of at least two preset message event schemes.
[0048] Optionally, the device further includes:
[0049] The second acquisition module is used to respond to the input configuration operation, acquire the event codes of multiple preset message events and the preset medical resources corresponding to the event codes of each preset message event;
[0050] The construction module is used to construct the preset parsing rule database based on the event codes of the multiple preset message events, the preset medical resources corresponding to the event codes of each preset message event, and the preset data dictionary;
[0051] The preset data dictionary includes the preset medical resource type, preset medical resource attribute, and preset medical resource parsing rules corresponding to the preset medical resource.
[0052] Optionally, the second parsing module is specifically used to construct a preset FHIR resource parsing algorithm based on the message syntax characteristics of the FHIR format and a preset breadth-first search algorithm; according to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules are used to parse the medical information message to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
[0053] Optionally, the second parsing module is specifically used to parse the medical information message according to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules, and the preset programming language reflection mechanism, to obtain the resource object, resource attribute, value of the resource attribute, and resource keyword of the at least one FHIR medical resource. The resource keyword is used to indicate the position of the element corresponding to the corresponding FHIR medical resource in the medical information message.
[0054] Optionally, the device further includes:
[0055] An encapsulation module is used to encapsulate the resource data of the at least one FHIR medical resource into structured resource data;
[0056] The display module is used to render and display the resource parsing results of the preset data display mode on a preset visualization page based on the structured resource data.
[0057] Optionally, the display module is specifically used to render and display the resource parsing results in the form of charts on a preset visualization page based on the structured resource data; or, based on the resource hierarchy and resource association relationships in the structured resource data, to render and display the resource parsing results in a tree structure on the preset visualization page.
[0058] The beneficial effects of this application are as follows: This application provides a medical data parsing method, which includes: acquiring a medical information message in FHIR format from a Fast Medical Interoperability Resource (FHIR); parsing the medical information message for message events to obtain the event code of the target message event corresponding to the medical information message; determining a target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database based on the event code of the target message event; and parsing the medical information message using the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message. In this application, the medical information message in FHIR format is first parsed for message events, and then the target FHIR medical resource parsing rule is determined based on the time code of the parsed target message event and the preset parsing rule database. Using this target FHIR medical resource parsing rule can reliably and accurately parse the medical information message, and the resource data of at least one FHIR medical resource obtained is data that can be understood even by non-professionals. Attached Figure Description
[0059] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 1 ;
[0061] Figure 2 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 2 ;
[0062] Figure 3 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 3 ;
[0063] Figure 4 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 4 ;
[0064] Figure 5 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 5 ;
[0065] Figure 6 This application provides a schematic diagram of the data structure in a preset parsing rule database.
[0066] Figure 7 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 7 ;
[0067] Figure 8 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 8 ;
[0068] Figure 9 A schematic diagram illustrating the resource parsing results of a tree structure provided in an embodiment of this application;
[0069] Figure 10 This is a schematic diagram of the structure of a medical data parsing device provided in an embodiment of this application;
[0070] Figure 11 This is a schematic diagram of the structure of a medical data analysis device provided in an embodiment of this application. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0072] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0073] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of this application is usually placed in, it is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0074] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0075] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.
[0076] The following explains the terms used in the embodiments of this application.
[0077] FHIR: Fast Healthcare Interoperability Resources is a standard for medical information exchange. It is based on modern Web technologies and Internet standards and aims to achieve interoperability and scalability of medical data.
[0078] This application provides a medical data parsing method, which is applied to a medical data parsing device. The medical data parsing device can be a terminal device or a server. The terminal device can be any of the following: computer equipment, laptop computer, tablet computer, or smartphone.
[0079] The following is an explanation of a medical data parsing method provided in the embodiments of this application.
[0080] Figure 1 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method may include:
[0081] S101. Obtain medical information messages in FHIR format.
[0082] In some implementations, in response to a user's message upload operation on the front-end system, the front-end system obtains a medical information message in FHIR format and sends it to the back-end system, enabling the back-end system to retrieve the FHIR formatted medical information message. The front-end and back-end systems can be systems deployed on medical data parsing equipment.
[0083] It should be noted that FHIR format medical information messages can be FHIR format JSON (JavaScript Object Notation, a lightweight data interchange format) string messages.
[0084] S102. Perform message event parsing on the medical information message to obtain the event code of the target message event corresponding to the medical information message.
[0085] The event code of a target message event can be understood as an identifier for that event. A medical information message can correspond to one target message event.
[0086] In this embodiment of the application, medical information messages can be transformed to obtain transformed information; on the backend system, the transformed information can be parsed based on preset parsing rules to obtain the event code of the target message event corresponding to the medical information message.
[0087] S103. Based on the event code of the target message event, determine the target FHIR medical resource parsing rule that matches the target message event from the preset parsing rule database.
[0088] The preset parsing rule database can be deployed on the backend system. The preset parsing rule database can be pre-set with event codes for multiple preset message events, as well as preset medical resources corresponding to the event codes of each preset message event and preset medical resource parsing rules corresponding to the preset medical resources.
[0089] In some implementations, the target FHIR medical resource matching the target message event and the corresponding target FHIR medical resource parsing rules are determined based on the event code of the target message event and a preset parsing rule database. The target FHIR medical resource is the medical resource that needs to be parsed in the medical information message matched according to the target message event.
[0090] S104. Using the target FHIR medical resource parsing rules, parse the medical information message to obtain the resource data of at least one FHIR medical resource corresponding to the medical information message.
[0091] It should be noted that the target FHIR medical resource parsing rules are used to parse the target FHIR medical resources involved in the medical information message that need to be parsed, so as to obtain the resource data of at least one FHIR medical resource corresponding to the medical information message.
[0092] Among them, resource data of at least one FHIR medical resource can be displayed. The resource data of at least one FHIR medical resource is data that is easy for non-professionals to understand, that is, there is no threshold for understanding the resource data of at least one FHIR medical resource.
[0093] In summary, this application provides a medical data parsing method, which includes: acquiring a medical information message in FHIR format from a Rapid Medical Interoperability Resource (RFI); parsing the medical information message for message events to obtain the event code of a target message event corresponding to the medical information message; determining a target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database based on the event code of the target message event; and parsing the medical information message using the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message. In this application, the medical information message in FHIR format is first parsed for message events, and then the target FHIR medical resource parsing rule is determined based on the parsed target message event's time code and the preset parsing rule database. Using this target FHIR medical resource parsing rule allows for reliable and accurate parsing of the medical information message, ultimately obtaining resource data of at least one FHIR medical resource that is understandable even to non-professionals.
[0094] Optionally, Figure 2A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 2 ,like Figure 2 As shown, the process of parsing the medical information message in S102 above to obtain the event code of the target message event corresponding to the medical information message can include:
[0095] S201. Convert the medical information message into a target data object.
[0096] The backend system is deployed with a pre-configured framework based on actual needs. Optionally, the pre-configured framework can be the HAPI-FHIR framework, which is an open-source framework for developing and managing FHIR standards in the healthcare field.
[0097] In some implementations, the medical information message can be converted into a target data object using the HAPI-FHIR framework in the backend system. Optionally, the target data object can be a Bundle object, where a Bundle is a data structure used to store and transmit information. It can package various types of data together and access them in the form of key-value pairs.
[0098] S202. Determine the target element resource whose element resource type is message header from the target data object.
[0099] S203. Parse the event codes of the target element resource to obtain the event codes of the target message event.
[0100] The target data object includes multiple element resources.
[0101] It is worth noting that multiple element resources in the target data object have corresponding element resource types. Since the target element resource with the element resource type of message header contains the event code of the target message event, it is necessary to determine the target element resource with the element resource type of message header from the multiple element resources included in the target data object, and then perform event code parsing on the target element resource to obtain the event code of the target message event.
[0102] Optionally, Figure 3 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 3 ,like Figure 3 As shown, based on the event code of the target message event, the target FHIR medical resource parsing rule matching the target message event is determined from the preset parsing rule database, including:
[0103] S301. Based on the event code of the target message event and the preset parsing rule database, determine the target message event scheme that matches the target message event.
[0104] The preset parsing rule database includes: event codes for multiple preset message events, preset medical resources corresponding to the event codes of each preset message event, attributes corresponding to each preset medical resource, and preset medical resource parsing rules.
[0105] In some implementations, the target message event includes: at least two preset message event schemes; each preset message event scheme includes: multiple associated medical resources; based on the event code of the target message event, the attributes of each resource in each preset message event scheme existing in the preset parsing rule data are determined; based on the attributes of each medical resource in each preset message event scheme and the attributes of each medical resource in each preset message event scheme existing in the preset parsing rule data, a target message event scheme matching the target message event is determined from the at least two preset message event schemes.
[0106] S302. Determine the target FHIR medical resource parsing rules based on the target resource model in the target message event scheme.
[0107] Among them, the target resource model is used to indicate the medical resources associated with the target message event and the medical resource parsing rules.
[0108] In this embodiment of the application, the preset parsing rule database includes: preset medical resource parsing rules corresponding to multiple preset medical resources; from the multiple preset medical resources in the preset parsing rule database, a target preset medical resource that matches the medical resource in the target message event scheme is searched; and the preset medical resource parsing rule corresponding to the target preset medical resource in the preset parsing rule database is used as the target FHIR medical resource parsing rule.
[0109] Optionally, each medical resource in the target message event scheme can be used as the target FHIR medical resource, that is, the medical resource that needs to be parsed in the medical information message.
[0110] Optionally, the target message event includes: at least two preset message event schemes; Figure 4 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 4 ,like Figure 4 As shown, the process in S301 above, which determines the target message event scheme matching the target message event based on the event code of the target message event and the preset parsing rule database, may include:
[0111] S401. Determine the first number of attributes of medical resources in each preset message event scheme.
[0112] Each preset message event scheme includes multiple medical resources and multiple attributes for each medical resource. It should be noted that the number of attributes for each medical resource in each preset message event scheme can be counted to obtain the first count.
[0113] S402. Based on the event code of the target message event, determine the second number of attributes of medical resources in the preset parsing rule database in each preset message event scheme.
[0114] In some implementations, based on the event code of the target message event, multiple attributes of each medical resource in each preset message event scheme that exist in the preset parsing rule database are searched, and the number of multiple attributes of each medical resource in each preset message event scheme that exist in the preset parsing rule database is counted to obtain a second number.
[0115] S403. Based on the first quantity, the second quantity, and the number of medical resources in the preset message event scheme, determine the matching degree of at least two preset message event schemes.
[0116] In some implementations, a preset first formula can be used to calculate the matching degree of each medical resource in each preset message event scheme based on the first quantity, the second quantity, and the weight of each medical resource in each preset message event scheme.
[0117] The first formula can be expressed as:
[0118]
[0119] Where count(k) represents the first number of attributes of a medical resource in a preset message event scheme, z represents the second number of attributes of a medical resource in a preset parsing rule database in a preset message event scheme, w represents the weight of a medical resource in the target message event in a preset message event scheme, and a i This indicates the matching degree of a medical resource within a preset message event scheme.
[0120] In this embodiment of the application, a preset second formula can be used to determine the matching degree of at least two preset message event schemes based on the matching degree of each medical resource in each preset message event scheme and the number of medical resources in each preset message event scheme.
[0121] The second formula can be expressed as:
[0122]
[0123] Among them, a iThis represents the matching degree of a medical resource in a preset message event scheme, where n is the total number of medical resources in a preset message event scheme, and S represents the matching degree of a preset message event scheme.
[0124] S404. Determine the target message event scheme based on the matching degree of at least two preset message event schemes.
[0125] It should be noted that, based on the matching degree of at least two preset message event schemes, the preset message event scheme with the highest matching degree is determined as the target message event scheme.
[0126] Optionally, Figure 5 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 5 ,like Figure 5 As shown, before the process in S103 above of determining the target FHIR medical resource parsing rule matching the target message event from the preset parsing rule database based on the event code of the target message event, the method may further include:
[0127] S501, respond to the input configuration operation, obtain the event codes of multiple preset message events and the preset medical resources corresponding to the event codes of each preset message event.
[0128] The number of preset medical resources corresponding to the event codes of each preset message event can be multiple.
[0129] In this embodiment of the application, the user can input configuration operations through a graphical user interface, and the front-end system responds to the input configuration operations to obtain the event codes of multiple preset message events configured by the user and the preset medical resources corresponding to the event codes of each preset message event.
[0130] S502. Construct a preset parsing rule database based on the event codes of multiple preset message events, the preset medical resources corresponding to the event codes of each preset message event, and the preset data dictionary.
[0131] The preset data dictionary includes the preset medical resource type, preset medical resource attributes, and preset medical resource parsing rules corresponding to the preset medical resources.
[0132] It is worth noting that the preset parsing rule database includes: event codes for multiple preset message events, preset medical resources corresponding to each preset message event's event code, and preset medical resource types, preset medical resource attributes, and preset medical resource parsing rules corresponding to each preset medical resource. Furthermore, the event codes for preset message events also correspond to specific preset message events.
[0133] In practical applications, the data dictionary covers FHIR standard data. Users can configure and maintain the data dictionary through a graphical user interface, facilitating easy querying and updates. A mechanism for configuring and maintaining parsing rules has been established. Manually configuring parsing rules and display schemes through the user interface allows for dynamic configuration and adjustment of front-end display requirements, achieving flexible configuration and management.
[0134] This application provides a data dictionary that maintains FHIR standard data, which can be used for querying when parsing FHIR format medical information messages.
[0135] Figure 6 This application provides a schematic diagram of the data structure in a preset parsing rule database, as shown in the embodiments of this application. Figure 6 As shown, it includes: the event code of the preset message event, the event code of the preset message event has a corresponding preset message event, the preset message event has a corresponding main entry resource, the preset message event is associated with the preset medical resource; the preset medical resource has a corresponding resource type and resource name, the preset medical resource is associated with the preset medical resource attribute, and the preset medical resource attribute has a corresponding parsing rule, attribute type, and attribute value type.
[0136] Among them, preset message events can be called FHIR message events, preset medical resources can be called FHIR resources, and preset medical resource attributes can be called FHIR attributes.
[0137] Optionally, Figure 7 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 7 ,like Figure 7 As shown, the process in S104 above, which uses the target FHIR medical resource parsing rules to parse the medical information message and obtain the resource data of at least one FHIR medical resource corresponding to the medical information message, may include:
[0138] S601. Based on the message syntax characteristics of the FHIR format and the preset breadth-first search algorithm, a preset FHIR resource parsing algorithm is constructed.
[0139] Among them, the preset breadth-first search algorithm is a graph traversal algorithm that starts from a given starting node and expands outward layer by layer. It first visits the adjacent nodes of the starting node, then visits the adjacent nodes of the adjacent nodes, and so on, until all reachable nodes have been traversed.
[0140] It should be noted that the default FHIR resource resolution algorithm can traverse FHIR resources. The default FHIR resource resolution algorithm is suitable for handling complex resource relationships between FHIR resources, ensuring that all FHIR resources and attributes can be correctly resolved.
[0141] S602. According to the preset FHIR resource parsing algorithm, the medical information message is parsed using the target FHIR medical resource parsing rule to obtain the resource data of at least one FHIR medical resource corresponding to the medical information message.
[0142] In some implementations, based on a preset FHIR resource parsing algorithm and using target FHIR medical resource parsing rules, the target FHIR medical resources involved in the event code of the target message event in the medical information message that need to be parsed are parsed to obtain the resource data of at least one FHIR medical resource corresponding to the medical information message.
[0143] The process in S602 above, which parses medical information messages according to a preset FHIR resource parsing algorithm and a target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message, may include:
[0144] Based on the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules and the preset programming language reflection mechanism are used to parse the resource attributes of the medical information message to obtain the resource object, resource attribute, value of resource attribute and resource keyword of at least one FHIR medical resource. The resource keyword is used to indicate the position of the element corresponding to the corresponding FHIR medical resource in the medical information message.
[0145] In this embodiment, the resource object, resource attributes, resource attribute values, and resource keywords of at least one FHIR medical resource are stored in a predefined format for unified return and display. This embodiment can parse the meaning of elements in FHIR format medical information messages and clearly indicate the position of each element in the FHIR message.
[0146] In this embodiment of the application, when traversing all attributes of medical resources in the medical information message in detail, the resource attributes of the FHIR medical resources in the medical information message are parsed by combining the target FHIR medical resource parsing rules with the reflection mechanism in the Java programming language (which is an object-oriented programming language), and the true values of the attributes of each FHIR medical resource are obtained.
[0147] For example, to parse the "class" attribute of the "Encounter" (medical visit) resource, the dictionary code is obtained through getClass_().getCode(), and the dictionary description information is obtained through getClass_().getDisplay().
[0148] It should be noted that the core code of the preset FHIR resource resolution algorithm is as follows:
[0149]
[0150]
[0151]
[0152] The `bfsParseBundle` method uses a breadth-first search strategy to parse resources in the FHIR Bundle. It first initializes a queue, adds all resources from the Bundle, then retrieves each resource for parsing, adding all child resources to the queue. The `fsParseResource` method recursively parses resources. It first checks if the resource has been accessed, then parses the resource attributes according to attribute rules, storing the results in the `parsedResults` list. Helper methods include: `getReferencedResource` (gets the referenced resource), `parseAttribute` (parses the resource's attributes), `getChildren` (gets the resource's child resources), and `loadRulesDictionary` (loads the dictionary of parsing rules).
[0153] Optionally, Figure 8 A flowchart illustrating a medical data parsing method provided in this application embodiment. Figure 8 ,like Figure 8 As shown, the method may further include:
[0154] S701. Encapsulate the resource data of at least one FHIR medical resource into structured resource data.
[0155] S702. Based on the structured resource data, render and display the resource parsing results of the preset data display mode on the preset visualization page.
[0156] Specifically, the resource data of at least one FHIR medical resource can be encapsulated as a structured array.
[0157] In this embodiment, the backend system feeds back the resource objects, resource attributes, resource attribute values, and resource keywords from the structured resource data to the frontend system, so that the frontend system can render and display the resource parsing results of the preset data display mode on the preset visualization page.
[0158] Optionally, the process in S702 above, which renders and displays the resource parsing results in a preset data format on a preset visualization page based on the structured resource data, may include:
[0159] Based on the structured resource data, the resource parsing results are rendered and displayed in the form of charts on a preset visualization page.
[0160] Specifically, based on structured resource data, data tables are dynamically generated on a preset visualization page, and the resource parsing results are displayed to ensure that the resource parsing results are easy to read and understand.
[0161] For example, the data table format of the resource parsing results is as follows:
[0162]
[0163] It should be noted that the "detailParamOutputList" field can be parsed by the front-end system and rendered into a data table for display, as shown in Table 1.
[0164] Table 1
[0165]
[0166]
[0167] Alternatively, based on the resource hierarchy and resource relationships in the structured resource data, the resource parsing results in a tree structure can be rendered and displayed on a preset visualization page.
[0168] The tree structure displays resources according to hierarchy and relationships, giving the resource parsing results a good sense of hierarchy and logic. For example, the data structure is shown below:
[0169]
[0170]
[0171] Optionally, Figure 9 This is a schematic diagram illustrating the resource parsing results of a tree structure provided in an embodiment of this application, such as... Figure 9 As shown, the next level of information in the message event information includes: patient information, medical visit information, insurance information, diagnosis information, department information, and ward information. Among these, the message event information includes: event code and event name; for example, the event name could be "admission registration." Patient information includes: name, gender, age, and mobile phone number; medical visit information includes: medical visit registration number, inpatient medical record number, and number of hospitalizations; insurance information includes: insurance type name; diagnosis information includes: diagnosis name, diagnosis code, and diagnosing doctor; department information includes: department code and department name; and ward information includes: ward name and ward code.
[0172] The next level of information in the medical visit information includes: ward information and appointment information; the next level of information in the diagnosis information includes: diagnosing doctor information and patient information. Ward information includes: ward resource ID (Identity document, unique code); appointment information includes: appointment resource ID; diagnosis information includes: doctor resource ID; patient information includes: patient resource ID.
[0173] It should be noted that the tree structure allows users to clearly understand the relationships and hierarchies of medical resources, enabling them to more intuitively understand the medical resource information in FHIR format medical information messages.
[0174] This application's embodiments support diverse display methods, including not only standard tables but also various data display modes such as charts and graphical representations, to adapt to different user needs and improve data visualization and application efficiency. Furthermore, by identifying key resources through business logic, accurately analyzing the relationships between FHIR resources, and clearly and intuitively displaying these relationships on the front-end page, it enhances data readability and usability.
[0175] In practical applications, intelligent parsing tools can be deployed on medical data parsing devices to execute the medical data parsing method provided in this application embodiment.
[0176] In summary, this application provides a medical data parsing method that can automatically parse FHIR messages and display FHIR-formatted medical data in a clear and intuitive manner, making the data meaning easier to understand and utilize effectively. It improves parsing accuracy and efficiency, enabling users to quickly understand the data meaning in FHIR messages and significantly lowering the barrier for non-professionals to learn and use FHIR; it enhances data visualization, allowing users to intuitively understand and analyze medical data through a clear front-end display, supporting more accurate medical decisions; and it supports flexible parsing rule configuration and diverse display methods to meet the needs of different users and usage scenarios, achieving flexible generation and configuration.
[0177] The following describes the medical data parsing apparatus, medical data parsing device, and storage medium used to execute the medical data parsing method provided in this application. For the specific implementation process and technical effects, please refer to the relevant content of the above-mentioned medical data parsing method, which will not be repeated below.
[0178] Figure 10 This is a schematic diagram of the structure of a medical data analysis device provided in an embodiment of this application, as shown below. Figure 10 As shown, the device includes:
[0179] The first acquisition module 101 is used to acquire medical information messages in FHIR format from rapid medical interoperability resources;
[0180] The first parsing module 102 is used to parse the medical information message into a message event to obtain the event code of the target message event corresponding to the medical information message.
[0181] The determination module 103 is used to determine the target FHIR medical resource parsing rule that matches the target message event from a preset parsing rule database based on the event code of the target message event;
[0182] The second parsing module 104 is used to parse the medical information message using the target FHIR medical resource parsing rules to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
[0183] Optionally, the first parsing module 102 is specifically used to convert the medical information message into a target data object; determine the target element resource with the element resource type of message header from the target data object; and perform event code parsing on the target element resource to obtain the event code of the target message event.
[0184] Optionally, the determining module 103 is specifically used to determine a target message event scheme that matches the target message event based on the event code of the target message event and the preset parsing rule database; and to determine the target FHIR medical resource parsing rule based on the target resource model in the target message event scheme, wherein the target resource model is used to indicate the medical resources associated with the target message event and the medical resource parsing rule.
[0185] Optionally, the target message event includes: at least two preset message event schemes; the determining module 103 is specifically used to determine a first number of attributes of medical resources in each preset message event scheme; determine a second number of attributes of medical resources in the preset parsing rule database in each preset message event scheme according to the event code of the target message event; determine the matching degree of at least two preset message event schemes according to the first number, the second number, and the number of medical resources in the preset message event schemes; and determine the target message event scheme according to the matching degree of at least two preset message event schemes.
[0186] Optionally, the device further includes:
[0187] The second acquisition module is used to respond to the input configuration operation, acquire the event codes of multiple preset message events and the preset medical resources corresponding to the event codes of each preset message event;
[0188] The construction module is used to construct the preset parsing rule database based on the event codes of the multiple preset message events, the preset medical resources corresponding to the event codes of each preset message event, and the preset data dictionary;
[0189] The preset data dictionary includes the preset medical resource type, preset medical resource attribute, and preset medical resource parsing rules corresponding to the preset medical resource.
[0190] Optionally, the second parsing module 104 is specifically used to construct a preset FHIR resource parsing algorithm based on the message syntax characteristics of the FHIR format and a preset breadth-first search algorithm; according to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules are used to parse the medical information message to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
[0191] Optionally, the second parsing module 104 is specifically used to parse the medical information message according to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules, and the preset programming language reflection mechanism, to obtain the resource object, resource attribute, value of the resource attribute, and resource keyword of the at least one FHIR medical resource. The resource keyword is used to indicate the position of the element corresponding to the corresponding FHIR medical resource in the medical information message.
[0192] Optionally, the device further includes:
[0193] An encapsulation module is used to encapsulate the resource data of the at least one FHIR medical resource into structured resource data;
[0194] The display module is used to render and display the resource parsing results of the preset data display mode on a preset visualization page based on the structured resource data.
[0195] Optionally, the display module is specifically used to render and display the resource parsing results in the form of charts on a preset visualization page based on the structured resource data; or, based on the resource hierarchy and resource association relationships in the structured resource data, to render and display the resource parsing results in a tree structure on the preset visualization page.
[0196] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0197] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0198] Figure 11 This is a schematic diagram of the structure of a medical data analysis device provided in an embodiment of this application, as shown below. Figure 11 As shown, the medical data parsing device includes: processor 201 and memory 202.
[0199] The memory 202 is used to store programs, and the processor 201 calls the programs stored in the memory 202 to execute the above method embodiments. The specific implementation and technical effects are similar, and will not be described in detail here.
[0200] Optionally, this application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.
[0201] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0202] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0203] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0204] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0205] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A medical data analysis method, characterized in that: include: Get medical information messages in Fast Healthcare Interoperability Resource (FHIR) format; Performing message event parsing on the medical information message to obtain an event code of a target message event corresponding to the medical information message; According to the event code of the target message event, determine a target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database; The medical information message is parsed using the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
2. The method according to claim 1, characterized in that The performing message event parsing on the medical information message to obtain an event code of a target message event corresponding to the medical information message includes: Converting the medical information message into a target data object; Determine, from the target data object, a target element resource whose element resource type is a message header; The event code of the target element resource is parsed to obtain the event code of the target message event.
3. The method according to claim 1, characterized in that The step of determining a target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database according to the event code of the target message event includes: Determining a target message event solution matching the target message event according to the event code of the target message event and the preset parsing rule database; The target FHIR medical resource parsing rule is determined according to the target resource model in the target message event scheme, wherein the target resource model is used to indicate the medical resources associated with the target message event and the medical resource parsing rule.
4. The method according to claim 3, characterized in that The target message event includes: at least two preset message event schemes; the determining of the target message event scheme matching the target message event according to the event code of the target message event and the preset parsing rule database includes: Determining a first quantity of attributes of medical resources in each of the preset message event scenarios; Determining, according to the event code of the target message event, a second number of attributes of the medical resource in the preset parsing rule database in each of the preset message event schemes; Determining a matching degree of at least two of the preset message event schemes according to the first number, the second number, and the number of medical resources in the preset message event scheme; The target message event scheme is determined according to the matching degree of at least two of the preset message event schemes.
5. The method according to claim 4, characterized in that Before determining, according to the event code of the target message event, a target FHIR medical resource parsing rule matching the target message event from a preset parsing rule database, the method further includes: In response to the input configuration operation, event codes of multiple preset message events and preset medical resources corresponding to the event codes of each preset message event are obtained; Constructing the preset parsing rule database according to the event codes of the plurality of preset message events, the preset medical resources corresponding to the event codes of the preset message events, and a preset data dictionary; The preset data dictionary includes the preset medical resource type, preset medical resource attribute and preset medical resource parsing rules corresponding to the preset medical resource.
6. The method according to claim 1, characterized in that The adopting the target FHIR medical resource parsing rule to parse the medical information message to obtain resource data of at least one FHIR medical resource corresponding to the medical information message includes: Based on the message syntax characteristics of the FHIR format and a preset breadth-first search algorithm, a preset FHIR resource parsing algorithm is constructed; According to the preset FHIR resource parsing algorithm and using the target FHIR medical resource parsing rule, the medical information message is parsed to obtain resource data of at least one FHIR medical resource corresponding to the medical information message.
7. The method according to claim 6, characterized in that The step of parsing the medical information message according to the preset FHIR resource parsing algorithm and using the target FHIR medical resource parsing rule to obtain resource data of at least one FHIR medical resource corresponding to the medical information message includes: According to the preset FHIR resource parsing algorithm, the target FHIR medical resource parsing rules and the preset programming language reflection mechanism are adopted to parse the resource attributes of the medical information message to obtain the resource object, resource attributes, values of the resource attributes and resource keywords of the at least one FHIR medical resource, wherein the resource keywords are used to indicate the position of the element corresponding to the corresponding FHIR medical resource in the medical information message.
8. The method according to claim 1, characterized in that The method further comprises: Encapsulating resource data of the at least one FHIR medical resource into structured resource data; According to the structured resource data, the resource parsing result of the preset data display mode is rendered and displayed in the preset visualization page.
9. The method according to claim 8, characterized in that The rendering and displaying of the resource parsing result in a preset data format in a preset visualization page according to the structured resource data includes: Rendering and displaying resource analysis results in the form of charts on a preset visualization page according to the structured resource data; Alternatively, according to the resource levels and resource association relationships in the structured resource data, the resource parsing results in a tree structure are rendered and displayed in the preset visualization page.
10. A medical data analysis device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the medical data analysis method described in any one of claims 1 to 9 when executing the computer program.
Citation Information
Cited By
FHIR service construction method and device, electronic equipment and storage medium
CN121209846A
A FHIR service construction method and device, electronic equipment and storage medium
CN121209846B