Form generation method and system and electronic equipment
By generating domain-specific language rules based on medical data, the form action data and method data are automatically encapsulated, which solves the problems of high R&D costs and high complexity in the form development process, and efficient and flexible form generation is achieved.
Patent Information
- Application Number
- CN202410173900.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2025-08-08
AI Technical Summary
In the existing technology, there are problems such as high R&D costs, high communication difficulty, long development cycle, low rule utilization rate, low iteration efficiency and high maintenance costs in the form development process. Especially when the form business rules in different regions are very different, it is difficult to achieve unified management.
The rule logic based on medical data determines domain-specific language rules, obtains code data through process analysis rules, and uses metamodels and rule functions to generate form action data and method data to realize the automated encapsulation of the form.
The workload in the form generation process is reduced, complexity is reduced, flexibility and reusability are improved, and the above-mentioned problems in the prior art are solved.
Smart Images

Figure CN120447890A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of form development, and in particular to a form generation method, system and electronic equipment. Background Art
[0002] To improve form quality and data entry efficiency, and ensure form data integrity, validity, consistency, and standardization, it's necessary to integrate relevant business rules based on the form's content. In real-world scenarios, form business rules and quality control rules are generally implemented using programming languages. However, due to the significant differences in form business rules across regions, engineers must rewrite specific business rules during form development. This results in high R&D costs, communication difficulties, and difficulty managing forms uniformly. This leads to problems such as long form development cycles, low rule utilization, inefficient form iteration, and high maintenance costs. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a form generation method, system and electronic device, which can determine the corresponding domain-specific language rules based on the rule logic of medical data, so as to accurately describe the business rules corresponding to the medical data, and automatically encapsulate the form action data and form method data through the domain-specific language rules to generate the corresponding form. This not only reduces the workload in the form generation process and reduces the complexity of form generation, but also has high flexibility and strong reusability, thereby solving the above-mentioned problems existing in the prior art.
[0004] In a first aspect, an embodiment of the present invention provides a form generation method, the method comprising:
[0005] Determine a process parsing rule based on the workflow corresponding to the medical data, and obtain the code data corresponding to the medical data according to the process parsing rule;
[0006] Determining multiple meta-models based on the structural data contained in the code data, and using the meta-models to determine domain-specific language rules corresponding to the medical data; wherein the domain-specific language rules include rule functions corresponding to the code data;
[0007] The form action data and form method data contained in the code data are determined by using the rule function contained in the domain specific language rule, and the form action data and form method data are used to generate a form corresponding to the medical data.
[0008] In one embodiment, determining a process parsing rule based on a workflow corresponding to the medical data, and obtaining code data corresponding to the medical data according to the process parsing rule includes:
[0009] Obtaining process parameters corresponding to the medical data, and determining the workflow corresponding to the medical data based on the process parameters;
[0010] Generate a visual rule engine corresponding to medical data based on the workflow, and use the visual rule engine to determine the process parsing rules corresponding to the form;
[0011] Obtain the code data corresponding to the medical data according to the process parsing rules.
[0012] In one embodiment, obtaining code data corresponding to medical data according to process parsing rules includes:
[0013] Initializing a process parser corresponding to the medical data; wherein the process parser is a graphical parser that uses graphic blocks to represent the medical data;
[0014] Obtain page data corresponding to the drop-down box, input box, and pop-up box contained in the medical data according to the process parsing rules, and obtain the graphic block corresponding to the page data;
[0015] Based on the process parsing rules, the label data and attribute data contained in the page data are combined using graphic blocks to generate code data corresponding to the medical data.
[0016] In one embodiment, a step of determining multiple meta-models based on structural data included in the code data, and using the meta-models to determine domain-specific language rules corresponding to the medical data, wherein the domain-specific language rules include rule functions corresponding to the code data, includes:
[0017] Acquire conditional statement data and branch structure data contained in the code data, and construct multiple meta-models based on the conditional statement data and branch structure data;
[0018] Obtain the trigger event corresponding to the code data based on the process parsing rules, and determine the business rule data corresponding to the code data based on the trigger event;
[0019] Business rule data is used to determine the corresponding rule functions between meta-models, and the rule functions are used to determine the domain-specific language rules corresponding to the medical data.
[0020] In one embodiment, the steps of obtaining a trigger event corresponding to the code data based on a process parsing rule and determining business rule data corresponding to the code data according to the trigger event include:
[0021] Determine the input method and exposure event corresponding to the code data according to the process parsing rules, and use the input method and exposure event to determine the trigger event corresponding to the code data;
[0022] Decompose the code data using trigger events to obtain the entity data, activity data, and method data corresponding to the code data;
[0023] Based on the process parsing rules, the business rule data corresponding to the code data is obtained according to the entity data, activity data and method data.
[0024] In one embodiment, the steps of determining form action data and form method data contained in code data using rule functions contained in domain-specific language rules, and generating a form corresponding to the medical data using the form action data and form method data include:
[0025] According to the rule function contained in the domain specific language rule, the form action function and the form method function contained in the rule function are obtained;
[0026] Using the form action function and the form method function, determine the form action data and the form method data contained in the code data;
[0027] Based on the process parsing rules, the form action data and form method data are used to generate the form corresponding to the medical data.
[0028] In one embodiment, after the step of determining the form action data and form method data contained in the code data using the form action function and the form method function, the method further includes:
[0029] Use form action data and form method data to generate product documents corresponding to the form.
[0030] In one embodiment, generating a form corresponding to medical data using form action data and form method data includes:
[0031] Determine the validation rules for the form based on the rule functions contained in the domain-specific language rules;
[0032] Generate the form and test cases corresponding to the medical data using the form action data and form method data;
[0033] After verifying the test case using the validation rules, the form corresponding to the medical data is obtained.
[0034] In a second aspect, an embodiment of the present invention provides a form generation system, the system comprising:
[0035] A data generation module is used to determine a process parsing rule based on the workflow corresponding to the medical data, and obtain code data corresponding to the medical data according to the process parsing rule;
[0036] A rule formulation module is used to determine multiple meta-models based on the structural data contained in the code data, and use the meta-models to determine domain-specific language rules corresponding to the medical data; wherein the domain-specific language rules include rule functions corresponding to the code data;
[0037] The form acquisition module is used to use the rule functions contained in the domain-specific language rules to determine the form action data and form method data contained in the code data, and use the form action data and form method data to generate a form corresponding to the medical data.
[0038] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the form generation method provided in the first aspect.
[0039] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the form generation method provided in the first aspect.
[0040] The embodiments of the present invention provide a form generation method, system, and electronic device. During the form generation process, the process first determines the process parsing rules based on the workflow corresponding to the medical data, and obtains the code data corresponding to the medical data according to the process parsing rules; then, multiple meta-models are determined based on the structural data contained in the code data, and the meta-models are used to determine the domain-specific language rules corresponding to the medical data; wherein the domain-specific language rules include rule functions corresponding to the code data; finally, the rule functions contained in the domain-specific language rules are used to determine the form action data and form method data contained in the code data, and the form action data and form method data are used to generate the form corresponding to the medical data. This method can determine the corresponding domain-specific language rules based on the rule logic of the medical data, thereby accurately describing the business rules corresponding to the medical data, and automatically encapsulates the form action data and form method data through the domain-specific language rules to generate the corresponding form. This not only reduces the workload and complexity of the form generation process, but also has high flexibility and strong reusability, thereby solving the above-mentioned problems existing in the prior art.
[0041] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 A flowchart of a form generation method provided by an embodiment of the present invention;
[0045] Figure 2 A flowchart of step S101 in a form generation method provided in an embodiment of the present invention;
[0046] Figure 3 A flowchart of step S203 in a form generation method provided in an embodiment of the present invention;
[0047] Figure 4 A flowchart of step S102 in a form generation method provided in an embodiment of the present invention;
[0048] Figure 5 A flowchart of step S402 in a form generation method provided in an embodiment of the present invention;
[0049] Figure 6 A flowchart of step S103 in a form generation method provided in an embodiment of the present invention;
[0050] Figure 7 A flowchart of step S103 in another form generation method provided by an embodiment of the present invention;
[0051] Figure 8 A flowchart of a form generation method provided in an embodiment of the present invention, which generates a form corresponding to medical data using form action data and form method data;
[0052] Figure 9 A schematic diagram of the overall process of a form generation method provided by an embodiment of the present invention;
[0053] Figure 10 A schematic diagram of the structure of a form generation system provided by an embodiment of the present invention;
[0054] Figure 11 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.
[0055] icon:
[0056] 1010-data generation module; 1020-rule formulation module; 1030-form acquisition module;
[0057] 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] In order to improve the quality of forms and the efficiency of filling in data, and to ensure the integrity, validity, consistency and standardization of form data, it is necessary to link relevant business rules according to the content of the form. In actual scenarios, form business rules and quality control rules are generally implemented by writing relevant programming languages. Since the form business rules in different regions are quite different, engineers need to rewrite them for different business rules when developing forms. The R&D cost is high, and communication is difficult. It is difficult to manage forms in a unified manner. There are problems such as long form development cycle, low rule utilization, low form iteration efficiency, and high maintenance cost. Based on this, the present invention provides a form generation method, system and electronic device. The method can determine the corresponding domain-specific language rules based on the rule logic of medical data, so as to accurately describe the business rules corresponding to the medical data, and automatically encapsulate the form action data and form method data through the domain-specific language rules to generate the corresponding form. This not only reduces the workload in the form generation process and reduces the complexity of form generation, but also has high flexibility and strong reusability, thereby solving the above-mentioned problems existing in the prior art.
[0060] To facilitate understanding of this embodiment, a form generation method disclosed in an embodiment of the present invention is first described in detail. Figure 1 Shown, including:
[0061] Step S101, determining a process parsing rule based on the workflow corresponding to the medical data, and obtaining code data corresponding to the medical data according to the process parsing rule;
[0062] Step S102, determining a plurality of meta-models based on the structural data contained in the code data, and using the meta-models to determine domain-specific language rules corresponding to the medical data; wherein the domain-specific language rules include rule functions corresponding to the code data;
[0063] Step S103 : using the rule function included in the domain specific language rule, determining the form action data and form method data included in the code data, and generating a form corresponding to the medical data using the form action data and form method data.
[0064] The core of the form generation process is the form configuration process, which is essentially the interactive process of the form page. The existing form configuration process mainly fills in data in the input form specified by the product to implement specific rule configuration, but this approach can only meet some simple rule configurations. For public health system forms that contain business rules and quality control rules related to medical data, these requirements can only be met through programming languages. By obtaining the workflow corresponding to the medical data, and then determining the process parsing rules, these rules have certain rules to follow. Therefore, specific domain-specific language rules, namely DSL (Domain Specific Language) rules, are generated through their corresponding code data. A nested and reusable rule configuration interface can be built, and then rule data that can be parsed into any programming language can be configured.
[0065] The syntax for DSL rules is highly flexible and can express arbitrary business rules, helping to define different forms that meet specific business needs. Specifically, the DSL syntax consists of conditionals, connectors, operators, functions, and actions. It encapsulates a large number of public health business rule functions corresponding to medical data. These rule functions can be used to determine the form action data and form method data contained in the code data, and then use this data to generate forms corresponding to the medical data.
[0066] In one embodiment, a process parsing rule is determined based on the workflow corresponding to the medical data, and step S101 of obtaining code data corresponding to the medical data according to the process parsing rule is performed. Figure 2 Shown, including:
[0067] Step S201, obtaining process parameters corresponding to the medical data, and determining the workflow corresponding to the medical data according to the process parameters;
[0068] Step S202: Generate a visual rule engine corresponding to the medical data based on the workflow, and use the visual rule engine to determine a process parsing rule corresponding to the form;
[0069] Step S203: Obtain code data corresponding to the medical data according to the process analysis rules.
[0070] Workflows are derived from process parameters, which represent the business logic contained in the medical data. Using the relevant data corresponding to the workflow, a visual rule engine corresponding to the medical data can be constructed. The visual rule engine includes a nested and reusable rule configuration interface, which allows the configuration of rule data that can be parsed into any programming language.
[0071] In the actual implementation process, secondary development can be carried out in vue.js based on Blockly, and corresponding process parsing rules can be obtained on the basis of Blockly, such as business operations such as BMI (Body Mass Index) calculation, follow-up date calculation, and gestational age calculation, which can improve work efficiency more efficiently. Blockly is not a programming language, but a library that adds a visual code editor to Web or Android / iOS applications. Blockly uses interlocking, graphical blocks to represent concepts in the code, such as variables, logical expressions, loops, etc. Blockly can convert the user's program into JavaScript, Python or other languages. However, the traditional Blockly provides limited building blocks and cannot meet the current business rule requirements. Therefore, the form generation method in the embodiment of the present invention is a secondary development of Blockly during execution, so that the corresponding building blocks are formulated according to the business rules to generate the corresponding programming language.
[0072] In one embodiment, the code data corresponding to the medical data is obtained according to the process analysis rules S203, such as Figure 3 Shown, including:
[0073] Step S301, initializing a process parser corresponding to the medical data; wherein the process parser is a graphical parser that uses graphic blocks to represent the medical data;
[0074] Step S302: obtaining page data corresponding to the drop-down box, input box, and pop-up box contained in the medical data according to the process parsing rules, and obtaining the graphic block corresponding to the page data;
[0075] Step S303 : Based on the process analysis rules, the tag data and the attribute data contained in the page data are combined using the graphic blocks to generate code data corresponding to the medical data.
[0076] Specifically, the graphical parser in this embodiment can be implemented through Blockly. Blockly is a graphical programming tool that runs on a web page. Its corresponding Blockly editor uses interlocking graphic blocks to represent code concepts, such as variables, logical expressions, loops, etc. Users obtain corresponding applications by dragging and dropping puzzle pieces. The advantage of Blockly does not lie in defining which functional blocks are included in the interface. What is important is that it can flexibly define building blocks and freely match building blocks so that a bunch of interlocking building blocks can be translated into a common XML language to calculate the corresponding results. Therefore, in this embodiment, the page data corresponding to the drop-down box, input box and pop-up box corresponding to the development building block are used to convert the JSON data generated by the drop-down box, input box and pop-up box used in combination on the page into XML code that can be parsed by the Blockly editor.
[0077] Specifically, the idea of reverse deduction can be adopted. The present invention adopts the method of reverse deduction: first, create the basic building blocks in the Blockly tool; then, drag the building blocks in the Blockly editor, combine them, and generate a part of the basic business function code and XML statements. After analyzing the generated XML statements, it is found that these XML statements are composed of fixed tags block, field, value, attributes type, id, name, x, y, and the block tag (building block) nests the field tag (value input) and the value tag (statement input). Type is the building block type, id marks the uniqueness of the building block, name marks the building block name, and x and y are the positions of the building blocks on the workbench. According to the above rules, it can be seen that a corresponding JSON object can be reversed based only on the tag name, the tag nesting level, and the building block type type, as follows:
[0078]
[0079]
[0080] Blocks of the same type use the same JSON object conversion. For example, the "Get Today's Date" and "Determine Whether PC Version" function blocks have the same block shape, only the generated code is different. Therefore, the configuration process on the page is the same, and the JSON objects generated by the conversion differ only in type; all other properties are the same. Therefore, the data generated on the page is in the form of an object array. Each block corresponds to an object, and the object name matches the block name, making it easier to find and convert.
[0081] In one embodiment, multiple meta-models are determined based on the structural data included in the code data, and the meta-models are used to determine the domain-specific language rules corresponding to the medical data; wherein the domain-specific language rules include step S102 of the rule function corresponding to the code data, such as Figure 4 Shown, including:
[0082] Step S401, obtaining conditional statement data and branch structure data contained in code data, and constructing multiple meta-models based on the conditional statement data and branch structure data;
[0083] Step S402: obtaining a trigger event corresponding to the code data based on the process parsing rule, and determining the business rule data corresponding to the code data according to the trigger event;
[0084] Step S403: using the business rule data to determine the rule functions corresponding to the meta-models, and using the rule functions to determine the domain specific language rules corresponding to the medical data.
[0085] Programming languages are composed of four parts: constants, variables, and data models; arithmetic and logical operations; branching and looping structures; functions; and business rules. Because the embodiments of this invention are primarily based on medical data, using medical data and performing statistics and analysis based on basic public health business rules, conditional statements and branching structures are most commonly used in this process.
[0086] Based on the conditional statement data and branch structure data, multiple metamodels were constructed. These metamodels can be understood as models of secondary processes and are specifically divided into seven metamodels: "if," entity object, pipeline, operator, entity object, and "then," action. The pipeline encapsulates common utility functions used in basic forms; actions are form interactions, such as showing / hiding a form item, disabling a drop-down box option, and assigning values to form fields. This ensures a better alignment with basic public health business rules, facilitates front-end code standardization, and improves development efficiency.
[0087] In one embodiment, the trigger event corresponding to the code data is obtained based on the process parsing rule, and the step S402 of determining the business rule data corresponding to the code data according to the trigger event is as follows: Figure 5 Shown, including:
[0088] Step S501: determining the input mode and exposure event corresponding to the code data according to the process analysis rule, and determining the trigger event corresponding to the code data using the input mode and exposure event;
[0089] Step S502: Decompose the code data using the trigger event to obtain entity data, activity data, and method data corresponding to the code data;
[0090] Step S503 : Based on the process parsing rules, business rule data corresponding to the code data is obtained according to the entity data, activity data, and method data.
[0091] Specifically, the input method corresponds to the input method of the form content, for example, the input method of a text box is text input, and the input method of a drop-down box is click confirmation. The exposure event corresponds to the trigger condition of the trigger event; for example, the exposure event can be a focus loss event or a value change event. Therefore, the input method and exposure event can be used to determine the trigger event corresponding to the code data.
[0092] After triggering events are captured, the code data is decomposed based on their specific meanings to obtain the entity data, activity data, and method data corresponding to the code data. Based on the process parsing rules, the entity data, activity data, and method data are then used to obtain the business rule data corresponding to the code data. Based on the seven meta-models obtained: "if", entity object, pipeline, operator, entity object, "then", action, the corresponding domain-specific language rules can be:
[0093] If [Current form.Height is equal to null] or [Current form.Weight is equal to null], then [Action assignment (Current form.BMI, null)];
[0094] If [current form.height is not equal to empty] or [current form.weight is not equal to empty], then [Action assignment (current form.BMI, BMI algorithm (current form.height, current form.weight))].
[0095] When business rules involve complex business logic such as loops, they are generally encapsulated to improve the usage rate of building blocks through parameter passing. At the same time, it can also simplify the user configuration process so that users do not need to pay too much attention to the configuration process and only need to focus on the configured business, thereby improving configuration efficiency.
[0096] In one embodiment, the form action data and form method data contained in the code data are determined by using the rule function contained in the domain specific language rule, and the form action data and form method data are used to generate a form corresponding to the medical data in step S103, as shown in FIG. Figure 6 Shown, including:
[0097] Step S601: According to the rule function included in the domain specific language rule, the form action function and the form method function included in the rule function are obtained;
[0098] Step S602, using the form action function and the form method function, determining the form action data and the form method data contained in the code data;
[0099] Step S603: Based on the process parsing rules, a form corresponding to the medical data is generated using the form action data and the form method data.
[0100] During the form acquisition process, a set of parsing rules for methods and actions was developed, corresponding to the methods and actions that users can select on the page. First, based on the rule functions contained in the DSL rules, the form action functions and form method functions contained therein were retrieved. This then led to the determination of the form action data and form method data contained in the code data. Finally, the corresponding medical data form was generated based on the process parsing rules. In actual implementation, this was achieved using a method and action parsing template, which corresponds to the methods and actions that users can select on the form page. In this template, the statement structure remained consistent with the DSL syntax, with entities, actions, and attributes passed into the parsing via parameters. Parameters entered or selected by the user, such as common data types and drop-down options, were inserted into the statement using a data dictionary index and automatically parsed into the corresponding Chinese statement. For example, for the "Single Field Assignment" action block, the parsing generates the statement "Field [field] equals [xxx]," where field is the passed parameter and xxx is the drop-down option or user-entered value.
[0101] In one embodiment, after step S602 of determining the form action data and form method data contained in the code data using the form action function and form method function, the form action data and form method data are used to generate the product document corresponding to the form. Figure 7 Another flowchart of step S103 shown includes:
[0102] Step S701: According to the rule function included in the domain specific language rule, the form action function and the form method function included in the rule function are obtained;
[0103] Step S702, using the form action function and the form method function, determining the form action data and the form method data contained in the code data;
[0104] Step S703: Generate a product document corresponding to the form using the form action data and form method data;
[0105] Step S704: Based on the process parsing rules, a form corresponding to the medical data is generated using the form action data and the form method data.
[0106] Form action data and form method data can be configured according to the relevant business rules of the form and combined with the method action parsing template to obtain the corresponding product documentation to facilitate business rule analysis and reference of the product.
[0107] In one embodiment, the form action data and the form method data are used to generate a form corresponding to the medical data, such as Figure 8 Shown, including:
[0108] Step S801, determining the form validation rules according to the rule functions included in the domain specific language rules;
[0109] Step S802: Generate a form corresponding to the medical data and its test case using the form action data and the form method data;
[0110] Step S803: After verifying the test case using the verification rules, a form corresponding to the medical data is obtained.
[0111] The form generation process also allows for validation. Specifically, each validation rule has a corresponding Cypress programming language test rule script. Form test case data drives the execution of the corresponding Cypress programming language test rule script, thereby automating the validation of the entire form. This primarily verifies the effectiveness of configured business rules and quality control rules and the presence of vulnerabilities. If all test cases pass, the rule validation is successful. If rule validation fails, the automated testing framework alerts the user that the test case has failed.
[0112] For example, to verify the business rule "Age greater than or equal to 65, the elderly are automatically selected as the key population", during the automated test verification process, users of different ages are tested using Mock ID number data to determine whether the elderly option in the key population on the page is selected.
[0113] For example, to verify the "ID number cannot be empty" quality control rule, during automated testing and verification, a simulated click on the submit form button is used to determine if there is a warning below the ID number input box on the page. If the ID number field is empty and the warning exists, this quality control check is complete.
[0114] Compared to traditional manual test forms, this embodiment generates and executes automated test cases by parsing the rule data in the form JSON file. This replaces traditional manual testing behaviors such as clicking, sliding, and browsing, effectively reducing the risk of human error and improving test accuracy and reliability. Developers no longer need to manually write complex test scripts. Instead, they can generate test cases through simple rule configuration. This innovative design not only saves time, but also ensures test consistency and repeatability, significantly improving the efficiency of the entire development and testing process.
[0115] like Figure 9The figure shows an overall process diagram of a form generation method, which includes five levels of processes. The first-level process includes the rule engine workflow, which is visualized through the GUI; it also includes the business process of the process parser. The second-level process includes the acquisition process of the metamodel, involving the acquisition process of "if", entity objects, pipelines, operators, entity objects, and "then", actions. The third-level process involves the formulation of specific rules for DSL grammar and the detailed design of grammar. The fourth-level process involves the specific use of relevant generators, so that the generators can output the product documents, front-end form code, and validation rule use cases involved in the fifth-level process.
[0116] It can be seen from the form generation method in the above embodiment that this method can determine the corresponding domain-specific language rules based on the rule logic of medical data, thereby accurately describing the business rules corresponding to the medical data, and automatically encapsulating the form action data and form method data through the domain-specific language rules to generate the corresponding form. This not only reduces the workload in the form generation process and reduces the complexity of form generation, but also has high flexibility and strong reusability, thereby solving the above-mentioned problems existing in the prior art.
[0117] Regarding the form generation method provided in the above embodiment, the embodiment of the present invention provides a form generation system, such as Figure 10 As shown, the system includes:
[0118] A data generation module 1010 is configured to determine a process parsing rule based on the workflow corresponding to the medical data, and obtain code data corresponding to the medical data according to the process parsing rule;
[0119] A rule formulation module 1020 is configured to determine a plurality of meta-models based on the structural data contained in the code data, and to determine domain-specific language rules corresponding to the medical data using the meta-models; wherein the domain-specific language rules include rule functions corresponding to the code data;
[0120] The form acquisition module 1030 is used to determine the form action data and form method data contained in the code data using the rule function contained in the domain specific language rule, and generate a form corresponding to the medical data using the form action data and form method data.
[0121] From the form generation system mentioned in the above embodiment, it can be seen that the system can determine the corresponding domain-specific language rules based on the rule logic of medical data, so as to accurately describe the business rules corresponding to the medical data, and automatically encapsulate the form action data and form method data through the domain-specific language rules to generate the corresponding form. This not only reduces the workload in the form generation process and reduces the complexity of form generation, but also has high flexibility and strong reusability, thereby solving the above-mentioned problems existing in the prior art.
[0122] The form generation system provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned form generation method embodiment. For the sake of brief description, any matters not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned form generation method embodiment.
[0123] This embodiment also provides an electronic device. The structural diagram of the electronic device is as follows: Figure 11 As shown, the device includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the above-mentioned form generation method.
[0124] Figure 11 The electronic device shown further includes a bus 103 and a communication interface 104 , and the processor 101 , the communication interface 104 and the memory 102 are connected via the bus 103 .
[0125] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 11 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0126] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.
[0127] The processor 101 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 101 or by instructions in the form of software. The above-mentioned processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 102, and processor 101 reads information in memory 102 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.
[0128] An embodiment of the present invention further provides a storage medium storing a computer program. When the computer program is executed by a processor, the steps of the form generating method in the above embodiment are executed.
[0129] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0131] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0132] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0133] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A form generation method, characterized in that: The method comprises: Determining a process parsing rule based on the workflow corresponding to the medical data, and obtaining code data corresponding to the medical data according to the process parsing rule; Determining a plurality of meta-models based on the structural data included in the code data, and determining domain-specific language rules corresponding to the medical data using the meta-models; wherein the domain-specific language rules include rule functions corresponding to the code data; The rule function included in the domain-specific language rule is used to determine the form action data and form method data included in the code data, and the form action data and the form method data are used to generate a form corresponding to the medical data.
2. The form generation method according to claim 1, characterized in that: The step of determining a process parsing rule based on the workflow corresponding to the medical data, and obtaining the code data corresponding to the medical data according to the process parsing rule includes: Acquiring process parameters corresponding to the medical data, and determining the workflow corresponding to the medical data based on the process parameters; generating a visualization rule engine corresponding to the medical data based on the workflow, and determining the process parsing rule corresponding to the form using the visualization rule engine; Obtain code data corresponding to the medical data according to the process parsing rules.
3. The form generation method according to claim 2, wherein: The obtaining of code data corresponding to the medical data according to the process parsing rule includes: Initializing a process parser corresponding to the medical data; wherein the process parser is a graphical parser that uses graphic blocks to represent the medical data; Acquire page data corresponding to the drop-down box, input box, and pop-up box contained in the medical data according to the process parsing rule, and acquire the graphic block corresponding to the page data; Based on the process analysis rule, the tag data and attribute data included in the page data are combined using the graphic block to generate the code data corresponding to the medical data.
4. The form generation method according to claim 1, wherein: The step of determining a plurality of meta-models based on the structural data included in the code data, and determining domain-specific language rules corresponding to the medical data using the meta-models, wherein the domain-specific language rules include rule functions corresponding to the code data, comprises: Acquire conditional statement data and branch structure data contained in the code data, and construct a plurality of meta-models according to the conditional statement data and the branch structure data; Acquire a trigger event corresponding to the code data based on the process parsing rule, and determine business rule data corresponding to the code data according to the trigger event; The business rule data is used to determine the rule functions corresponding to the meta-models, and the rule functions are used to determine the domain-specific language rules corresponding to the medical data.
5. The form generation method according to claim 4, characterized in that: The step of obtaining a trigger event corresponding to the code data based on the process parsing rule, and determining business rule data corresponding to the code data according to the trigger event includes: Determining the input mode and exposure event corresponding to the code data according to the process parsing rule, and determining the trigger event corresponding to the code data using the input mode and the exposure event; Decomposing the code data using the trigger event to obtain entity data, activity data, and method data corresponding to the code data; Based on the process parsing rule, the business rule data corresponding to the code data is obtained according to the entity data, the activity data, and the method data.
6. The form generation method according to claim 1, wherein: The step of using the rule function included in the domain-specific language rule to determine the form action data and form method data included in the code data, and using the form action data and the form method data to generate a form corresponding to the medical data includes: According to the rule function contained in the domain specific language rule, obtaining the form action function and the form method function contained in the rule function; Determining the form action data and the form method data contained in the code data by using the form action function and the form method function; Based on the process parsing rules, a form corresponding to the medical data is generated using the form action data and the form method data.
7. The form generation method according to claim 6, characterized in that: After the step of determining the form action data and the form method data contained in the code data by using the form action function and the form method function, the method further comprises: The product document corresponding to the form is generated using the form action data and the form method data.
8. The form generation method according to claim 1, wherein: Generating a form corresponding to the medical data using the form action data and the form method data includes: Determining validation rules for the form according to the rule function contained in the domain specific language rule; Generating a form and test cases corresponding to the medical data using the form action data and the form method data; After the test case is verified using the verification rules, the form corresponding to the medical data is obtained.
9. A form generation system, characterized in that: The system comprises: A data generation module, configured to determine a process parsing rule based on a workflow corresponding to the medical data, and obtain code data corresponding to the medical data according to the process parsing rule; a rule-making module, configured to determine a plurality of meta-models based on the structural data contained in the code data, and to determine domain-specific language rules corresponding to the medical data using the meta-models; wherein the domain-specific language rules include rule functions corresponding to the code data; A form acquisition module is used to use the rule function contained in the domain-specific language rule to determine the form action data and form method data contained in the code data, and use the form action data and the form method data to generate a form corresponding to the medical data.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the form generation method according to any one of claims 1 to 8.