CN115935946A - Analytic mapping processing method and device of HL7V3 standard/FHIR standard - Google Patents

Analytic mapping processing method and device of HL7V3 standard/FHIR standard Download PDF

Info

Publication number
CN115935946A
CN115935946A CN202211550012.2A CN202211550012A CN115935946A CN 115935946 A CN115935946 A CN 115935946A CN 202211550012 A CN202211550012 A CN 202211550012A CN 115935946 A CN115935946 A CN 115935946A
Authority
CN
China
Prior art keywords
xpath
data
node
mapping
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211550012.2A
Other languages
Chinese (zh)
Other versions
CN115935946B (en
Inventor
朱智源
李彬槐
李辉
陈跃
何梦娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Yanhua Western Health And Medical Information Industry Research Institute Co ltd
Original Assignee
Chengdu Yanhua Western Health And Medical Information Industry Research Institute Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Yanhua Western Health And Medical Information Industry Research Institute Co ltd filed Critical Chengdu Yanhua Western Health And Medical Information Industry Research Institute Co ltd
Priority to CN202211550012.2A priority Critical patent/CN115935946B/en
Publication of CN115935946A publication Critical patent/CN115935946A/en
Application granted granted Critical
Publication of CN115935946B publication Critical patent/CN115935946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The analytic mapping processing method and device of HL7V3 standard/FFIR standard, the method includes mapping relation configuration and data conversion; the mapping relation configuration comprises the following steps: carrying out recursive analysis on the imported source data template and the imported target data template to obtain a source data XPath tree set and a target data XPath tree set; performing cyclic node mapping and value node mapping according to the set to obtain cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data; the data conversion comprises the following steps: carrying out format verification on input source data, and analyzing the source data into a corresponding XML document object; generating a complete structure target data template with a cycle structure; obtaining a target XPath tree set with a mapping relation; through detection, obtaining an XPath of the target data, and replacing the value of an XPath node corresponding to the target data template with a complete structure to obtain the target data; if not, the exception list is put in. The method can quickly analyze the structural data of standards such as HL7V3, FHIR and the like, and is convenient to modify and maintain.

Description

Analytic mapping processing method and device of HL7V3 standard/FHIR standard
Technical Field
The application belongs to the technical field of computers, particularly relates to a medical data processing technology, and particularly relates to an analytic mapping processing method and device of HL7V3 standard/FHIR standard.
Background
At present, the national interconnection and interworking medical interaction specification mainly uses the HL7V3 standard and the FHIR standard, and most medical data manufacturers use a processing method of analytic mapping, for example: some ESB tools are available with operations that transform the mapping using XSD scripts or code constructs.
The original method is to use XSL, needs to be written during development, and is not intuitive in maintenance; some tools can provide a maintenance interface, but in the case of loop and logic judgment, the code script is required to be used for completion, and the page use requires a large amount of learning cost and rich development experience, for example, to complete the parsing of a shared document of the HL7V3 protocol, approximately 3000 lines of groovy scripts are required to be written, and the use and maintenance are not easy. Therefore, improvements are needed.
Disclosure of Invention
In order to solve the defects of the prior art, the application provides an analysis mapping processing method and device of the HL7V3 standard/FHIR standard, which can quickly analyze HL7V3, FHIR and other complex standards constructed based on xml, save the operation configuration of converting complex HL7V3/FHIR format data into simple data, and facilitate modification and maintenance.
In order to achieve the above object, the present invention employs the following techniques:
an analytic mapping processing method of HL7V3 standard/FFIR standard comprises the steps of mapping relation configuration and data conversion.
Wherein, the mapping relation configuration comprises:
respectively carrying out recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set;
data verification is carried out, the basic length, the value range, the regular specification and the base number of data in the source data XPath tree set and the target data XPath tree set are verified, and the data are cached after the data are verified;
and performing cycle node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set to obtain cycle node XPath mapping information and value node XPath mapping information of the source data and the target data, and caching the cycle node XPath mapping information and the value node XPath mapping information.
The data conversion comprises the following steps:
carrying out format check on source data input in an HTTP (hyper text transport protocol) mode, and analyzing the input source data into a corresponding XML document object through an XML analysis packet; the input source data comprises structure data and a unique locator of a conversion scheme, wherein the structure data is HL7V3 standard, or FHIR standard, or standard constructed based on XML;
acquiring corresponding cyclic node XPath mapping information, value node XPath mapping information, a source data XPath tree set and a target data XPath tree set from a cache according to the unique locator;
constructing corresponding nodes of the obtained target data XPath tree set according to corresponding nodes of an XML document object based on the obtained circulation node XPath mapping information to generate a complete structure target data template with a circulation structure;
contracting the obtained target data XPath tree set based on the obtained value node XPath mapping information to obtain a target XPath tree set with a mapping relation;
carrying out data structure detection based on the XML document object and the obtained source data XPath tree set, circulating the source data XPath tree set, obtaining the value of a corresponding node from the XML document object through an XPath path, and carrying out detection on the length and the value range:
if the detection is passed, acquiring an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
if the detection is not passed, putting the abnormal list into the abnormal list;
if the exception list is not empty, the output detection is not passed, the exception list details are returned, and if the exception list is empty, the target data are output as texts and returned to the request end by HTTP response.
Further, when performing recursive analysis:
automatically generating XPath for the imported HL7V3 source data template/HL 7V3 target data template, supporting the Namespace added with XML to carry out XML analysis, configuring node screening conditions, and using recursive analysis XML for bottom logic to obtain an XPath corresponding to each XML node;
comparing whether the current XPath path is repeated in the whole tree, if so, judging whether all sub nodes of the lower three layers have the attribute matched with the node screening condition, if so, adding the attribute to the XPath path, and obtaining the XPath path with the screening condition as the XPath path of the unique path;
after obtaining the XPath of the unique path, putting an XPath tree set according to the hierarchical relation when analyzing the Xml to form a source data XPath tree set/a target data XPath tree set.
Furthermore, the data of the key nodes are mapped through value node mapping, and the corresponding father nodes are mapped through cycle node mapping.
An analytic mapping processing device of HL7V3 standard/FFIR standard comprises a mapping relation configuration module and a data conversion module.
Wherein, the mapping relation configuration module comprises:
the recursive analysis unit is used for respectively carrying out recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set;
the verification unit is used for verifying data, verifying the basic length, value range, regular specification and base number of data in the source data XPath tree set and the target data XPath tree set, and caching after the verification is qualified;
and the mapping unit is used for performing cyclic node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set to obtain cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data, and caching the cyclic node XPath mapping information and the value node XPath mapping information.
The data conversion module includes:
the input unit is used for carrying out format verification on source data input in an HTTP (hyper text transport protocol) mode and analyzing the input source data into a corresponding XML document object through an XML analysis packet; the input source data comprises structure data and a unique locator of a conversion scheme, wherein the structure data is HL7V3 standard, or FHIR standard, or standard constructed based on XML;
the obtaining unit is used for obtaining corresponding cycle node XPath mapping information, value node XPath mapping information, source data XPath tree sets and target data XPath tree sets from the cache according to the unique locator;
the circulation node configuration unit is used for constructing corresponding nodes of the obtained target data XPath tree set according to corresponding nodes of the XML document object based on the obtained circulation node XPath mapping information to generate a complete structure target data template with a circulation structure;
the value node configuration unit is used for contracting the obtained target data XPath tree set based on the obtained value node XPath mapping information to obtain a target XPath tree set with a mapping relation;
the detection replacement unit is used for carrying out data structure detection based on the XML document object and the obtained source data XPath tree set, circulating the source data XPath tree set, obtaining the value of the corresponding node from the XML document object through an XPath path, and carrying out detection on the length and the value range:
if the detection is passed, obtaining an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
if the detection is not passed, putting the abnormal list into the abnormal list;
and the output unit is used for returning the details of the exception list when the exception list is not empty, outputting the target data as a text when the exception list is empty, and returning the text to the request end in an HTTP response.
Further, the recursive analysis unit is used for automatically generating XPath for the imported HL7V3 source data template/HL 7V3 target data template, supporting XML analysis of Namespace added with XML, configuring node screening conditions, and using recursive analysis XML for the bottom logic to obtain an XPath path corresponding to each XML node; and is used for comparing whether the current XPath is repeated in the whole tree, if so, judging whether all the child nodes of the lower three layers have the attribute matched with the node screening condition, if so, adding the attribute to the XPath to obtain the XPath with the screening condition as the XPath of the unique path; and after obtaining the XPath of the unique path, putting an 'XPath tree set' according to the hierarchical relation when analyzing Xml to form a source data XPath tree set/target data XPath tree set.
Further, the mapping unit is configured to map data of the key node by value node mapping, and map a corresponding parent node by cycle node mapping.
An electronic device, comprising: at least one processor and a memory; wherein the memory stores computer-executable instructions; executing computer-executable instructions stored in the memory on the at least one processor causes the at least one processor to perform the HL7V3 standard/FHIR standard resolution mapping processing method.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, controls an apparatus on which the storage medium is located to perform the HL7V3 standard/FHIR standard parsing mapping processing method.
The invention has the beneficial effects that:
1. the HL7V3, FHIR and other complicated standards constructed based on xml can be quickly analyzed, the operation configuration of converting complicated HL7V3/FHIR format data into simple data is saved, and the modification and maintenance are facilitated;
2. the data verification can be carried out on the source data according to the requirements, the target data structure is quickly generated without a code base, the operation is simply configured, and the standard comparison is carried out by configuring a visual interface;
3. the solution provided by the tool in the prior art is that codes or scripts are used for mapping cyclic data, in the application, cyclic node mapping is added in a mapping link, and parent nodes of the cyclic data are compared in advance by configuring the cyclic node mapping to generate target node data with cyclic information in advance; the requirement of cyclic data mapping is met, and the source data cyclic node is supported to quickly generate the target data cyclic node.
Drawings
Fig. 1 is a flowchart of a method for processing resolution mapping according to an embodiment of the present application.
Fig. 2 is an exemplary diagram of recursive resolution according to an embodiment of the present application.
FIG. 3 is an exemplary diagram illustrating tree set contraction according to an embodiment of the present application.
Fig. 4 is a block diagram of a structure of an analysis mapping processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following detailed description of the embodiments of the present invention is provided with reference to the accompanying drawings, but the described embodiments of the present invention are a part of the embodiments of the present invention, not all of the embodiments of the present invention.
In one aspect of the embodiments of the present application, a method for processing parsing mapping of HL7V3 standard/FHIR standard is provided, as shown in fig. 1, including step of mapping relationship configuration and data conversion.
Specifically, the mapping relationship configuration includes the following detailed steps:
s11, importing an HL7V3 data template, and automatically analyzing:
and respectively carrying out recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set.
Specifically, when an HL7V3 source data template/an HL7V3 target data template is imported, automatic generation of XPath is selected, XML parsing is supported for Namespace added with XML, because the source XML data structure is complex, direct parsing can generate the same XPath path data, node screening conditions can be configured, the bottom layer logic uses recursive parsing XML, the obtained XPath corresponding to each XML node is compared with whether the current XPath path is repeated in the whole tree, if so, whether all sub-nodes of the lower three layers have the attribute matching the screening node conditions, if so, screening attributes are added to the XPath, and an XPath path with screening conditions is obtained, as shown in fig. 2, when the XPath path of the unique path is obtained, and an XPath tree-form set is put in accordance with the hierarchical relationship when the XML is parsed, that is an XPath tree-form set of the source data and an XPath tree set of the target data are obtained, and the XPath tree-form set is used for data construction in the later stage.
Although there are many tools or methods capable of quickly parsing XML in the general technical level, data similar to the HL7V3 standard has the characteristic of multiple attributes and multiple nodes, and XPath parsed from conventional data does not have a screening condition and cannot meet the requirement of mapping subsequent nodes. In this step, the comparison calculation of the peer node, child node, and grandchild node is repeatedly performed in the recursive process of the XML data to construct a unique XPath node, that is, an XPath path of the unique path.
And S12, data verification is carried out, the basic length, the value range, the regular specification and the base number of data in the source data XPath tree set and the target data XPath tree set are verified, and the data are cached after being verified to be qualified so as to be used for calling in the data conversion step.
S13, data mapping:
and performing cyclic node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set, corresponding the data of the key nodes through the value node mapping, mapping the corresponding father nodes through the cyclic node mapping, obtaining cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data, and caching the cyclic node XPath mapping information and the value node XPath mapping information for calling and using in the data conversion step.
Specifically, the data conversion comprises the following detailed steps:
s21, source data input:
carrying out format check on source data input in an HTTP (hyper text transport protocol) mode, analyzing the input source data into a corresponding XML document object through an XML analysis package, and acquiring data information in a preloading cache through scheme coding, wherein the data information comprises an XPath tree set and mapping information generated in a mapping relation configuration step; the input source data comprises structure data and a unique locator of a conversion scheme, wherein the structure data is HL7V3 standard, or FHIR standard, or other complex structure data constructed based on XML;
s22, acquiring mapping information and a data set:
and acquiring corresponding cycle node XPath mapping information, value node XPath mapping information, a source data XPath tree set and a target data XPath tree set from the pre-loaded data information according to the unique locator.
S23, mapping configuration, including cycle node XPath configuration and value node XPath configuration:
and (3) configuration of a cycle node XPath:
constructing corresponding nodes of the obtained target data XPath tree set according to corresponding nodes of an XML document object based on the obtained circulation node XPath mapping information to generate a complete structure target data template with a circulation structure, wherein except that value node mapping is not carried out, the number of corresponding circulation nodes is already generated, which is equivalent to that the complete structure target data template is just not provided with a replacement value node.
Value node XPath configuration:
in the mapping operation, not all nodes are mapped, and if the whole Xpath tree-shaped set is traversed, the time consumption is large, so that the time consumption is large, and the time consumption is based on the mapping result in advance, therefore, in this step, the obtained target data Xpath tree-shaped set is shrunk based on the obtained value node Xpath mapping information to obtain a target Xpath tree-shaped set with a mapping relation, as shown in fig. 3, the time consumption of subsequent circulation is reduced after the tree-shaped set is shrunk.
S24, data checking and target data value replacement:
by this step, four data messages have been obtained: the method comprises the steps of inputting an XML document object of source data, a source data XPath tree set, a complete structure target data template and a target XPath tree set with a mapping relation. When the step is carried out, the data structure detection is carried out based on the XML document object and the obtained source data XPath tree set, the source data XPath tree set is circulated, the value of the corresponding node is obtained from the XML document object through an XPath path, and the detection of the length and the value range is carried out:
if the detection is passed, acquiring an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
and if the detection is not passed, putting the abnormal list.
S25, target data output:
if the exception list is not empty, the output detection is not passed, and the details of the exception list are returned;
and if the exception list is empty, outputting the target data as a text, and returning the text to the request end by using an HTTP response.
By the mode, other complicated standards constructed based on xml can be acquired from HL7V3/FHIR for rapid analysis, data verification is carried out on source data as required, a target data structure is rapidly generated, code basis is not needed, operation is simply configured, and standard comparison can be carried out through a visual interface.
In another aspect of the embodiments of the present application, an apparatus for parsing and mapping an HL7V3 standard/FHIR standard is provided, as shown in fig. 4, including a mapping relationship configuration module and a data conversion module.
Specifically, the mapping relationship configuration module includes a recursive analysis unit, a check unit, and a mapping unit. The data conversion module comprises an input unit, an acquisition unit, a cyclic node configuration unit, a value node configuration unit, a detection and replacement unit and an output unit.
The recursive analysis unit respectively performs recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set. And the verification unit is used for verifying data, verifying the basic length, value range, regular specification and base number of the data in the source data XPath tree set and the target data XPath tree set, and caching after the verification is qualified. And the mapping unit performs cyclic node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set to obtain cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data, and caches the cyclic node XPath mapping information and the value node XPath mapping information.
The input unit carries out format check on source data input in an HTTP (hyper text transport protocol) mode and analyzes the input source data into a corresponding XML document object through an XML analysis packet; the input source data comprises structure data and a conversion scheme unique locator, wherein the structure data is HL7V3 standard, FHIR standard or standard constructed based on XML. And the acquisition unit acquires corresponding cycle node XPath mapping information, value node XPath mapping information, a source data XPath tree set and a target data XPath tree set from the cache according to the unique locator.
And the cycle node configuration unit constructs the corresponding nodes of the obtained target data XPath tree set according to the corresponding nodes of the XML document object based on the obtained cycle node XPath mapping information to generate a complete structure target data template with a cycle structure. And the value node configuration unit shrinks the obtained target data XPath tree set based on the obtained value node XPath mapping information to obtain a target XPath tree set with a mapping relation.
The detection replacement unit detects the data structure based on the XML document object and the obtained source data XPath tree set, circulates the source data XPath tree set, obtains the value of the corresponding node from the XML document object through an XPath path, and detects the length and the value range:
if the detection is passed, acquiring an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
if the detection is not passed, putting the abnormal list into the abnormal list;
and the output unit is used for returning the details of the exception list when the exception list is not empty, outputting the target data as a text when the exception list is empty, and returning the text to the request end in an HTTP response.
By the implementation of the embodiment, the complicated operation configuration for converting HL7V3 format data into simple data can be saved, and modification and maintenance are facilitated; meanwhile, the requirement of cyclic data mapping is met, the source data cyclic node is supported to rapidly generate the target data cyclic node, data quality inspection can be provided, and data structure and data quality inspection can be performed on source data through a radix inspection function.
In another aspect of the embodiments of the present application, an electronic device is provided, which includes: at least one processor and memory; wherein the memory stores computer-executable instructions; execution of the computer-executable instructions stored in the memory by the at least one processor causes the at least one processor to perform the method for parsing and mapping the HL7V3 standard/FHIR standard as described in the previous embodiments.
In another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the computer program controls an apparatus in which the storage medium is located to perform the method for processing the analytic mapping of the HL7V3 standard/FHIR standard according to the foregoing embodiments.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and it is apparent that those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application.

Claims (8)

1. An analytic mapping processing method of HL7V3 standard/FFIR standard is characterized by comprising the steps of mapping relation configuration and data conversion;
the mapping relation configuration comprises the following steps:
respectively carrying out recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set;
data verification is carried out, the basic length, the value range, the regular specification and the base number of data in the source data XPath tree set and the target data XPath tree set are verified, and the data are cached after the data are verified;
performing cyclic node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set to obtain cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data, and caching;
the data conversion comprises the following steps:
carrying out format check on source data input in an HTTP (hyper text transport protocol) mode, and analyzing the input source data into a corresponding XML document object through an XML analysis packet; the input source data comprises structure data and a unique locator of a conversion scheme, wherein the structure data is HL7V3 standard, or FHIR standard, or standard constructed based on XML;
acquiring corresponding cyclic node XPath mapping information, value node XPath mapping information, a source data XPath tree set and a target data XPath tree set from a cache according to the unique locator;
constructing corresponding nodes of the obtained target data XPath tree set according to corresponding nodes of an XML document object based on the obtained circulation node XPath mapping information to generate a complete structure target data template with a circulation structure;
contracting the obtained target data XPath tree set based on the obtained value node XPath mapping information to obtain a target XPath tree set with a mapping relation;
carrying out data structure detection based on the XML document object and the obtained source data XPath tree set, circulating the source data XPath tree set, obtaining the value of a corresponding node from the XML document object through an XPath path, and carrying out detection on the length and the value range:
if the detection is passed, acquiring an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
if the detection is not passed, putting the abnormal list into the abnormal list;
if the exception list is not empty, the output detection is not passed, the exception list details are returned, and if the exception list is empty, the target data are output as texts and returned to the request end by HTTP response.
2. The method for parsing mapping according to HL7V3 standard/FHIR standard as claimed in claim 1, wherein, in performing recursive parsing:
automatically generating XPath for the imported HL7V3 source data template/HL 7V3 target data template, supporting the Namespace added with XML to carry out XML analysis, configuring node screening conditions, and using recursive analysis XML for bottom logic to obtain an XPath corresponding to each XML node;
comparing whether the current XPath is repeated in the whole tree or not, if so, judging whether all the child nodes of the lower three layers have the attribute matched with the node screening condition or not, if so, adding the attribute to the XPath, and obtaining the XPath with the screening condition as the XPath of the unique path;
after obtaining the XPath of the unique path, putting an 'XPath tree set' according to the hierarchical relation when analyzing Xml to form a source data XPath tree set/target data XPath tree set.
3. The method of claim 1, wherein the data of key nodes are mapped by value node mapping, and corresponding parent nodes are mapped by round-robin node mapping.
4. An analysis mapping processing device of HL7V3 standard/FFIR standard is characterized by comprising a mapping relation configuration module and a data conversion module;
the mapping relation configuration module comprises:
the recursive analysis unit is used for respectively carrying out recursive analysis on the imported HL7V3 source data template and the imported HL7V3 target data template to respectively obtain a source data XPath tree set and a target data XPath tree set;
the verification unit is used for verifying data, verifying the basic length, value range, regular specification and base number of data in the source data XPath tree set and the target data XPath tree set, and caching after the verification is qualified;
the mapping unit is used for performing cyclic node mapping and value node mapping according to the source data XPath tree set and the target data XPath tree set to obtain cyclic node XPath mapping information and value node XPath mapping information of the source data and the target data, and caching the cyclic node XPath mapping information and the value node XPath mapping information;
the data conversion module includes:
the input unit is used for carrying out format verification on source data input in an HTTP (hyper text transport protocol) mode and analyzing the input source data into a corresponding XML document object through an XML analysis packet; the input source data comprises structure data and a unique locator of a conversion scheme, wherein the structure data is HL7V3 standard, or FHIR standard, or standard constructed based on XML;
the obtaining unit is used for obtaining corresponding cycle node XPath mapping information, value node XPath mapping information, source data XPath tree sets and target data XPath tree sets from the cache according to the unique locator;
the circulation node configuration unit is used for constructing corresponding nodes of the obtained target data XPath tree set according to corresponding nodes of the XML document object based on the obtained circulation node XPath mapping information to generate a complete structure target data template with a circulation structure;
the value node configuration unit is used for shrinking the obtained target data XPath tree set based on the obtained value node XPath mapping information to obtain a target XPath tree set with a mapping relation;
the detection replacement unit is used for carrying out data structure detection based on the XML document object and the obtained source data XPath tree set, circulating the source data XPath tree set, obtaining the value of the corresponding node from the XML document object through an XPath path, and carrying out detection on the length and the value range:
if the detection is passed, acquiring an XPath path of the target data through a target XPath tree set with a mapping relation, and replacing the value of an XPath node corresponding to a target data template with a complete structure to obtain the target data;
if the detection is not passed, putting the abnormal list into the abnormal list;
and the output unit is used for returning the details of the exception list when the exception list is not empty, outputting the target data as a text when the exception list is empty, and returning the text to the request end in an HTTP response.
5. The device for parsing mapping according to HL7V3 standard/FHIR standard as claimed in claim 4, wherein the recursive parsing unit is configured to select and automatically generate XPath for the imported HL7V3 source data template/HL 7V3 target data template, support Namespace added with XML for XML parsing, configure node screening conditions, and obtain XPath paths corresponding to each XML node by using recursive parsing XML for the underlying logic;
and is used for comparing whether the current XPath is repeated in the whole tree, if so, judging whether all the child nodes of the lower three layers have the attribute matched with the node screening condition, if so, adding the attribute to the XPath to obtain the XPath with the screening condition as the XPath of the unique path;
and after obtaining the XPath of the unique path, putting an XPath tree set according to the hierarchical relation when analyzing the Xml to form a source data XPath tree set/a target data XPath tree set.
6. The apparatus of claim 4, wherein the mapping unit is configured to map data of key nodes by value node mapping, and map corresponding parent nodes by round-robin node mapping.
7. An electronic device, comprising: at least one processor and memory; wherein the memory stores computer-executable instructions; wherein execution of the computer-executable instructions stored in the memory on the at least one processor causes the at least one processor to perform the method for HL7V3 standard/FHIR standard resolution mapping processing as claimed in any one of claims 1~3.
8. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, controls an apparatus in which the storage medium is located to perform the HL7V3 standard/FHIR standard analysis mapping processing method according to any one of claims 1~3.
CN202211550012.2A 2022-12-05 2022-12-05 Analytical mapping processing method and device for HL7V3 standard/FHIR standard Active CN115935946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211550012.2A CN115935946B (en) 2022-12-05 2022-12-05 Analytical mapping processing method and device for HL7V3 standard/FHIR standard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211550012.2A CN115935946B (en) 2022-12-05 2022-12-05 Analytical mapping processing method and device for HL7V3 standard/FHIR standard

Publications (2)

Publication Number Publication Date
CN115935946A true CN115935946A (en) 2023-04-07
CN115935946B CN115935946B (en) 2023-08-15

Family

ID=86556883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211550012.2A Active CN115935946B (en) 2022-12-05 2022-12-05 Analytical mapping processing method and device for HL7V3 standard/FHIR standard

Country Status (1)

Country Link
CN (1) CN115935946B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143321A1 (en) * 2005-12-16 2007-06-21 International Business Machines Corporation Converting recursive hierarchical data to relational data
CN102073662A (en) * 2009-11-23 2011-05-25 北大方正集团有限公司 Method and system for analyzing and creating XML (Extensible Markup Language) data
CN102609506A (en) * 2012-02-03 2012-07-25 杭州杰唐信息技术有限公司 Method for generating HL7 (Health Level 7) message through mapping
CN103123650A (en) * 2013-03-06 2013-05-29 同方知网(北京)技术有限公司 Extensible markup language (XML) data bank full-text indexing method based on integer mapping
CN103559321A (en) * 2013-11-22 2014-02-05 方正国际软件有限公司 Document format conversion system
CN109474686A (en) * 2018-11-16 2019-03-15 中国银行股份有限公司 A kind of XML message processing method and processing device
CN110502667A (en) * 2018-05-16 2019-11-26 南京大学 The parsing of ODX document and generation technique based on DOM frame
CN114185981A (en) * 2021-12-10 2022-03-15 东软汉枫医疗科技有限公司 Data processing method, system and storage medium
CN114338855A (en) * 2022-03-17 2022-04-12 成都瑞华康源科技有限公司 Method for realizing parsing and generating HL7, FHIR standard and custom XML message

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143321A1 (en) * 2005-12-16 2007-06-21 International Business Machines Corporation Converting recursive hierarchical data to relational data
CN102073662A (en) * 2009-11-23 2011-05-25 北大方正集团有限公司 Method and system for analyzing and creating XML (Extensible Markup Language) data
CN102609506A (en) * 2012-02-03 2012-07-25 杭州杰唐信息技术有限公司 Method for generating HL7 (Health Level 7) message through mapping
CN103123650A (en) * 2013-03-06 2013-05-29 同方知网(北京)技术有限公司 Extensible markup language (XML) data bank full-text indexing method based on integer mapping
CN103559321A (en) * 2013-11-22 2014-02-05 方正国际软件有限公司 Document format conversion system
CN110502667A (en) * 2018-05-16 2019-11-26 南京大学 The parsing of ODX document and generation technique based on DOM frame
CN109474686A (en) * 2018-11-16 2019-03-15 中国银行股份有限公司 A kind of XML message processing method and processing device
CN114185981A (en) * 2021-12-10 2022-03-15 东软汉枫医疗科技有限公司 Data processing method, system and storage medium
CN114338855A (en) * 2022-03-17 2022-04-12 成都瑞华康源科技有限公司 Method for realizing parsing and generating HL7, FHIR standard and custom XML message

Also Published As

Publication number Publication date
CN115935946B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN110287109B (en) Protocol interface testing method and device, computer equipment and storage medium thereof
CN108628748B (en) Automatic test management method and automatic test management system
CN102566984B (en) Method and device for configuring parameters
US20110137923A1 (en) Xbrl data mapping builder
US20120246334A1 (en) Unified web service uri builder and verification
CN106550038B (en) Data configuration diagnosis system and method of digital control system
CN111581920A (en) Document conversion method, device, equipment and computer storage medium
CN110941427B (en) Code generation method and code generator
CN113238740B (en) Code generation method, code generation device, storage medium and electronic device
CN111913705B (en) JavaScript template implementation method based on difference updating algorithm
CN110333863A (en) A kind of method and device for generating, showing the small routine page
CN112463261B (en) Interface calling method, device, electronic equipment, medium and product
CN114138244A (en) Method and device for automatically generating model files, storage medium and electronic equipment
CN110232178A (en) Report generation method and device
CN111061464A (en) Analysis code generation method, device, equipment and storage medium
CN115796190B (en) Front-end internationalization multi-language conversion method and system based on vue and weback
CN108664546B (en) XML data structure conversion method and device
CN115599386A (en) Code generation method, device, equipment and storage medium
US20080033968A1 (en) Methods and apparatus for input specialization
CN115935946A (en) Analytic mapping processing method and device of HL7V3 standard/FHIR standard
CN113672233B (en) Server out-of-band management method, device and equipment based on Redfish
CN116204421A (en) Test case generation method and device, storage medium and computer equipment
CN111563363B (en) Method for generating and analyzing document content of hypertext markup language
CN112433752A (en) Page parsing method, device, medium and electronic equipment
CN111783006A (en) Page generation method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant