Device and method for automatically calculating observation items according to formula

文档序号:1087396 发布日期:2020-10-20 浏览:8次 中文

阅读说明:本技术 根据公式自动计算观察项的装置及方法 (Device and method for automatically calculating observation items according to formula ) 是由 李超 周寿林 程宗星 孙丛兵 于 2020-07-15 设计创作,主要内容包括:本发明公开了一种根据公式自动计算观察项的装置及方法,包括:数据接收模块;数据存储模块;观察项模块,对观察项进行模型定义;字典模块,定义字典类观察项的计算值;计算公式模块,定义观察项之间的关联计算的若干第一计算公式;计算触发模块,定义每一个第一计算公式的触发条件;计算运行时模块,根据计算触发模块定义的触发条件自动调用对应的第一计算公式对数据存储模块中存储的观察项进行关联计算。本发明的根据公式自动计算观察项的装置及方法,对观察项进行模型定义,对字典类观察项设定对应的计算值,设定观察项之间的关联计算的若干第一计算公式,设定每个第一计算公式的触发条件,自动对输入的观察项进行关联计算。(The invention discloses a device and a method for automatically calculating an observation item according to a formula, wherein the method comprises the following steps: a data receiving module; a data storage module; the observation item module is used for carrying out model definition on the observation items; the dictionary module defines the calculation value of the dictionary type observation item; the calculation formula module is used for defining a plurality of first calculation formulas for correlation calculation among the observation items; the calculation triggering module defines triggering conditions of each first calculation formula; and the calculation runtime module automatically calls a corresponding first calculation formula according to the trigger condition defined by the calculation trigger module to perform correlation calculation on the observation items stored in the data storage module. The device and the method for automatically calculating the observation items according to the formulas define the models of the observation items, set corresponding calculation values for dictionary observation items, set a plurality of first calculation formulas for correlation calculation among the observation items, set triggering conditions of each first calculation formula and automatically perform correlation calculation on the input observation items.)

1. An apparatus for automatically calculating an observation term according to a formula, comprising:

the data receiving module is used for receiving a plurality of observation items, and the observation items comprise dictionary observation items and numerical observation items;

the data storage module is used for storing the received observation items;

the observation item module is used for carrying out model definition on all the observation items;

the dictionary module is used for defining calculation values corresponding to different dictionary class observation items;

a calculation formula module for defining a plurality of first calculation formulas for correlation calculation between the observation terms and input and output of each of the first calculation formulas;

the calculation triggering module is used for defining triggering conditions of each first calculation formula;

and the calculation runtime module is used for automatically calling the corresponding first calculation formula according to the trigger condition defined by the calculation trigger module to perform correlation calculation on the observation items stored in the data storage module.

2. The apparatus for automatically computing an observation term according to a formula according to claim 1,

the compute runtime module includes:

the general graph generating unit is used for automatically generating a directed acyclic graph as a general graph of all the calculation relations according to the relations of the observation items defined by all the first calculation formulas;

a subgraph generation unit, configured to extract a subgraph related to current computation from the directed acyclic graph according to the observation term involved in a certain first computation formula when the first computation formula is triggered;

a topology ranking unit for performing topology ranking on the generated subgraphs and determining the computation order of the observations involved;

the first data acquisition unit is used for acquiring corresponding numerical value observation items and dictionary observation items from the data storage module according to the model definition of the observation item module, and acquiring calculation values corresponding to the dictionary observation items from the dictionary module;

the data injection unit is used for injecting the obtained calculated values corresponding to the numerical class observation items and the dictionary class observation items into the subgraph;

a second data acquisition unit for acquiring calculation parameters required for calculation;

and the formula calculation unit is used for calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the calculated sequence of the topological sequencing.

3. The apparatus for automatically computing an observation term according to a formula according to claim 2,

the formula calculation unit includes:

the grammar parsing subunit is used for carrying out grammar parsing on the triggered first calculation formula to generate a grammar tree;

the variable subunit is used for replacing the variables in the first calculation formula with corresponding data;

an operator sub-unit for defining operator meaning in the first calculation formula;

a function subunit, configured to define a meaning of a function in the first calculation formula;

the evaluation subunit is used for traversing the syntax tree and calculating a root node as the output of the first calculation formula;

and the result deriving unit is used for deriving the calculation results of all the observation items in the subgraph to the corresponding observation items after all the calculations are finished.

4. The apparatus for automatically computing an observation term according to a formula according to claim 1,

the observation item module includes:

the observation item basic model unit is used for defining the general metadata of the observation item, and comprises a code, a name, a data type and a default value of the observation item;

the observation item additional model unit is used for defining the non-general metadata of the observation item, and comprises dictionary codes of the dictionary type observation items, and reasonable numerical value ranges and decimal point numbers of the numerical value type observation items;

the calculation formula module comprises:

the abstract formula unit is used for editing and storing all the first calculation formulas;

a formula input unit for defining an input of each of the first calculation formulas;

and the formula output unit is used for defining the output of each first calculation formula.

5. The apparatus for automatically computing an observation term according to a formula according to claim 4,

the calculation formula module is also used for defining a plurality of second calculation formulas of the correlation calculation between the target item and the observation item and the input and the output of each second calculation formula;

the abstract formula unit also stores all the second calculation formulas;

the formula input unit is also used for defining the input of each second calculation formula;

the formula output unit is further used for defining the output of each second calculation formula.

6. A method for automatically calculating an observation term according to a formula, comprising the steps of:

receiving a plurality of observation terms, wherein the observation terms comprise dictionary observation terms and numerical observation terms;

storing the received observation items;

performing model definition on all the observation items;

defining calculation values corresponding to different dictionary class observation items;

defining first calculation formulas for correlation calculations between the observation terms and inputs and outputs of each of the first calculation formulas;

defining a trigger condition for each of the first calculation formulas;

and automatically calling the corresponding first calculation formula according to a defined trigger condition to perform correlation calculation on the stored observation items.

7. The method of automatically computing an observation term according to a formula of claim 6,

the specific method for automatically calling the corresponding first calculation formula according to the defined trigger condition to perform the correlation calculation on the stored observation items comprises the following steps:

automatically generating a directed acyclic graph as a general graph of all the calculation relations according to the relations of the observation terms defined by all the first calculation formulas;

when a certain first calculation formula is triggered, extracting a subgraph related to the current calculation from the directed acyclic graph according to the observation term related to the first calculation formula;

performing topological sorting on the generated subgraphs and determining the calculation order of the observations involved;

acquiring corresponding numerical value observation items and dictionary observation items from the stored observation items according to the model definition of all the observation items, and acquiring calculated values corresponding to the dictionary observation items;

injecting the obtained calculated values corresponding to the numerical class observation items and the dictionary class observation items into the subgraph;

acquiring calculation parameters required by calculation;

and calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the sequence calculated by topological sequencing.

8. The method of automatically computing an observation term according to a formula of claim 7,

the specific method for calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the sequence calculated by topological sorting comprises the following steps:

the triggered first calculation formula is parsed to generate a syntax tree;

replacing variables in the first calculation formula with corresponding data;

traversing the syntax tree and calculating a root node as the output of the calculation formula according to the operator meaning and the function meaning in the calculation formula;

and after all the calculation is finished, exporting calculation results of all the observation items in the subgraph to the corresponding observation items.

9. The method of automatically computing an observation term according to a formula of claim 6,

the specific method for performing model definition on all the observation items comprises the following steps:

defining generic metadata for the observation term including a code, a name, and a data type of the observation term;

defining non-generic metadata for the observations, including dictionary codes for the dictionary class observations and reasonable numerical ranges and decimal places for the numerical class observations;

the specific method of defining the first calculation formula of the correlation calculation between the observation items and the input and output of each first calculation formula is as follows:

editing and storing all the first calculation formulas;

defining an input for each of said first calculation formulas;

an output of each of the first calculation formulas is defined.

10. The method of automatically computing an observation term according to a formula of claim 9,

the method for automatically calculating the observation term according to the formula further comprises the following steps:

defining a number of second calculation formulas of correlation calculation between the target item and the observation item and input and output of each second calculation formula;

and selecting the corresponding observation item from the stored observation items according to a selected certain second calculation formula to calculate to obtain the corresponding target item.

Technical Field

The invention relates to the technical field of medical information processing, in particular to a device and a method for automatically calculating an observation item according to a formula.

Background

With the continuous development of medical information technology, the record of clinical observation items of patients depends on information systems such as vital signs, administration metering, statistics of the amount of entrance and exit, and clinical scores in a large amount. The viewing item information may come from a variety of sources, perhaps from manual records by a caregiver, perhaps collected by a medical facility, and perhaps from other information systems such as a hospital administration system, a clinical laboratory information system, an electronic medical advice system.

The observation item information has the characteristics of high complexity and strong correlation, for example, clinical scoring needs to extract observation item data from a plurality of data sources, calculate and sum the observation item data, and then map the result to a final score, and a plurality of interdependent calculation relations exist among the observation items. In addition, the relationship between the observation items can have the requirement of changing along with the application scene, which requires that the calculation formula has certain configurability.

Disclosure of Invention

The invention provides a device and a method for automatically calculating an observation item according to a formula, which adopt the following technical scheme:

an apparatus for automatically calculating an observation term according to a formula, comprising:

the data receiving module is used for receiving a plurality of observation items, and the observation items comprise dictionary observation items and numerical observation items;

the data storage module is used for storing the received observation items;

the observation item module is used for carrying out model definition on all observation items;

the dictionary module is used for defining calculated values corresponding to different dictionary class observation items;

the calculation formula module is used for defining a plurality of first calculation formulas for correlation calculation among the observation items and the input and the output of each first calculation formula;

the calculation triggering module is used for defining triggering conditions of each first calculation formula;

and the calculation runtime module is used for automatically calling a corresponding first calculation formula according to the trigger condition defined by the calculation trigger module to perform correlation calculation on the observation items stored in the data storage module.

Further, the compute runtime module includes:

the general graph generating unit is used for automatically generating a directed acyclic graph as a general graph of all the calculation relations according to the relations of the observation terms defined by all the first calculation formulas;

the subgraph generation unit is used for extracting subgraphs related to current calculation from the directed acyclic graph according to observation items related to a certain first calculation formula when the first calculation formula is triggered;

the topology sequencing unit is used for carrying out topology sequencing on the generated subgraphs and determining the calculation sequence of the related observation;

the first data acquisition unit is used for acquiring corresponding numerical value observation items and dictionary observation items from the data storage module according to the model definition of the observation item module and acquiring a calculation value corresponding to the dictionary observation items from the dictionary module;

the data injection unit is used for injecting the obtained calculated values corresponding to the numerical value class observation items and the dictionary class observation items into the subgraph;

a second data acquisition unit for acquiring calculation parameters required for calculation;

and the formula calculation unit is used for calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the calculated sequence of the topological sequencing.

Further, the formula calculation unit includes:

the syntax analysis subunit is used for performing syntax analysis on the triggered first calculation formula to generate a syntax tree;

the variable subunit is used for replacing the variable in the first calculation formula with corresponding data;

an operator sub-unit for defining operator meaning in the first calculation formula;

a function subunit, configured to define a meaning of a function in the first calculation formula;

the evaluation subunit is used for traversing the syntax tree and calculating a root node as the output of the first calculation formula;

and the result exporting unit exports all the observation item calculation results in the subgraph to the corresponding observation items after all the calculations are finished.

Further, the observation item module includes:

the observation item basic model unit is used for defining the universal metadata of the observation item, and comprises a code, a name, a data type and a default value of the observation item;

the observation item additional model unit is used for defining the non-universal metadata of the observation item, and comprises dictionary codes of the dictionary type observation items, a reasonable numerical range and decimal digits of the numerical type observation items;

the calculation formula module comprises:

the abstract formula unit is used for editing and storing all the first calculation formulas;

a formula input unit for defining an input of each first calculation formula;

and the formula output unit is used for defining the output of each first calculation formula.

Further, the calculation formula module is also used for defining a plurality of second calculation formulas of the correlation calculation between the target item and the observation item and the input and the output of each second calculation formula;

the abstract formula unit also stores all second calculation formulas;

the formula input unit is also used for defining the input of each second calculation formula;

the formula output unit is also used for defining the output of each second calculation formula.

A method for automatically calculating an observation term according to a formula, comprising the steps of:

receiving a plurality of observation items, wherein the observation items comprise dictionary observation items and numerical observation items;

storing the received observation items;

performing model definition on all observation items;

defining calculation values corresponding to different dictionary class observation terms;

defining first calculation formulas for correlation calculations between observation terms and inputs and outputs of each of the first calculation formulas;

defining a trigger condition of each first calculation formula;

and automatically calling a corresponding first calculation formula according to a defined trigger condition to perform correlation calculation on the stored observation items.

Further, the specific method for automatically calling the corresponding first calculation formula according to the defined trigger condition to perform the association calculation on the stored observation items includes:

automatically generating a directed acyclic graph as a general graph of all the calculation relations according to the relations of the observation terms defined by all the first calculation formulas;

when a certain first calculation formula is triggered, extracting a subgraph related to the current calculation from the directed acyclic graph according to an observation term related to the first calculation formula;

carrying out topological sorting on the generated subgraphs and determining the calculation sequence of the related observations;

acquiring corresponding numerical value observation items and dictionary observation items from the stored observation items according to the model definition of all the observation items, and acquiring a calculation value corresponding to the dictionary observation items;

injecting the obtained calculated values corresponding to the numerical value class observation items and the dictionary class observation items into the subgraph;

acquiring calculation parameters required by calculation;

and calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the calculated sequence of the topological sequencing.

Further, according to the subgraph of the injected data and the obtained calculation parameters, the specific method for calculating the calculation result of each step in sequence according to the sequence calculated by topological sorting comprises the following steps:

carrying out syntactic analysis on the triggered first calculation formula to generate a syntactic tree;

replacing variables in the first calculation formula with corresponding data;

traversing the syntax tree and calculating a root node as the output of the calculation formula according to the operator meaning and the function meaning in the calculation formula;

and after all the calculation is finished, exporting calculation results of all the observation items in the subgraph to the corresponding observation items.

Further, the specific method for performing model definition on all observation items is as follows:

defining general metadata of the observation item, including a code, a name, and a data type of the observation item;

defining non-universal metadata of the observation items, wherein the non-universal metadata comprises dictionary codes of the dictionary type observation items, and reasonable numerical ranges and decimal point numbers of the numerical type observation items;

the specific method of defining the first calculation formulas of the correlation calculation between the observation terms and the input and output of each first calculation formula is as follows:

editing and storing all first calculation formulas;

defining an input for each first calculation formula;

the output of each first calculation formula is defined.

Further, the method for automatically calculating the observation term according to the formula further comprises the following steps:

defining a plurality of second calculation formulas of the correlation calculation between the target item and the observation item and the input and the output of each second calculation formula;

and selecting a corresponding observation item from the stored observation items according to a selected certain second calculation formula to calculate to obtain a corresponding target item.

The device and the method for automatically calculating the observation items according to the formulas have the advantages that the model definition is carried out on the observation items, the corresponding calculation values are set for the dictionary observation items, a plurality of first calculation formulas for the correlation calculation among the observation items are defined, the triggering condition of each first calculation formula is set, and the automatic correlation calculation is automatically carried out on the input observation items according to the setting.

Drawings

FIG. 1 is a schematic diagram of an apparatus for automatically calculating an observation term according to a formula according to the present invention;

FIG. 2 is a schematic diagram of a view item module of the present invention;

FIG. 3 is a schematic diagram of a calculation formula module of the present invention;

FIG. 4 is a schematic diagram of the compute runtime module of the present invention;

FIG. 5 is a schematic diagram of a formula calculation unit of the present invention;

the system comprises a data receiving module 10, a data storage module 20, an observation term module 30, an observation term base model unit 31, an observation term additional model unit 32, a dictionary module 40, a calculation formula module 50, an abstract formula unit 51, a formula input unit 52, a formula output unit 53, a calculation trigger module 60, a calculation runtime module 70, a general graph generating unit 71, a subgraph generating unit 72, a topology ordering unit 73, a first data acquiring unit 74, a data injection unit 75, a second data acquiring unit 76, a formula calculating unit 77, a syntax parsing subunit 771, a variable subunit 772, an operator subunit 773, a function subunit 774, an evaluation subunit 775 and a result deriving unit 776.

Detailed Description

The invention is described in detail below with reference to the figures and the embodiments.

Fig. 1 shows an apparatus for automatically calculating observation terms according to a formula according to the present invention, in which the observation terms mainly refer to data related to the patient himself, such as vital signs, administration dosage, statistics of the amount of input and output, clinical scores, etc. It mainly comprises: the system comprises a data receiving module 10, a data storage module 20, an observation term module 30, a dictionary module 40, a calculation formula module 50, a calculation triggering module 60 and a calculation runtime module 70.

The data receiving module 10 is used for receiving several observation items. The observation terms comprise dictionary-type observation terms and numerical-type observation terms. The numerical class observation term represents an observation term that can be described in a number, such as "blood pressure: 125 ", wherein the blood pressure is a numerical observation term. The dictionary type observation item is a character type description type observation item which is used for representing a certain observation item of the patient through a character narration, and the dictionary type observation item is more than a certain language reaction option: the answer is correct. ", verbal responses are dictionary-like observations.

Data sources of the data receiving module 10 include, but are not limited to, manual record entry, medical device acquisition, hospital management systems, clinical laboratory information systems, electronic ordering systems, and the like. Accordingly, the data receiving module 10 of the present invention is connected to one or more of an external data entry device, a medical acquisition device, a hospital management system, a clinical laboratory information system, and an electronic medical advice system for the acquisition of the observational item data.

The data storage module 20 is used to store the received observation items.

The observation item module 30 is used for performing model definition on all observation items, providing a uniform and complete model definition and data specification for all observation items in the system, and providing underlying model support for the observation item association computing system. Specifically, as shown in fig. 2, the observation item module 30 includes: an observation term base model unit 31 and an observation term addition model unit 32. The observation item base model unit 31 is used to define the general metadata of the observation item, including the code, name, data type and default value of the observation item, and provides support for the observation item general metadata definition. The observation term additional model unit 32 is used for defining the non-general metadata of the observation term, including the dictionary codes of the dictionary type observation terms and the reasonable numerical range and decimal place number of the numerical class observation terms, and providing support for the observation term non-general metadata definition.

The dictionary module 40 is used for defining the calculated values corresponding to the observation terms of different dictionary classes. As mentioned above, the observation terms comprise dictionary observation terms and numerical observation terms, and the dictionary observation terms are described by words and cannot be calculated in a public way. Therefore, in order to facilitate formula calculation, a plurality of dictionaries, dictionary entries contained in each dictionary, and calculation values corresponding to each dictionary entry are defined by the dictionary module 40. For example, the corresponding dictionary "speech response option" corresponds to 5 dictionary entries of "correct answer, wrong answer, incoherence, ambiguity and no response", wherein a calculated value corresponding to "correct answer" is 5, a calculated value corresponding to "wrong answer" is 4, a calculated value corresponding to "incoherence" is 3, a calculated value corresponding to "ambiguity" is 2, and a calculated value corresponding to "no response" is 1. By analogy, all used dictionaries are stored in the dictionary module 40. Thus, when the observation term is a dictionary-like observation term, its corresponding calculated value can be found from the dictionary module 40 according to the model definition of the observation term module 30.

The calculation formula module 50 is used to define several first calculation formulas for the calculation of associations between observation terms and the input and output of each first calculation formula. Specifically, as shown in fig. 3, the calculation formula module 50 includes: an abstract formula unit 51, a formula input unit 52, and a formula output unit 53. The abstract formula unit 51 is used for editing and storing all the first calculation formulas. The formula input unit 52 is used to define the input of each first calculation formula. The formula output unit 53 is used to define the output of each first calculation formula. Excel expressions, logical and mathematical operators may be used in the first calculation formula, with variables in the formula being replaced by placeholders, such as MAX ({ A }, { B }) + { C }/2. In formula input unit 52, the relevant inputs are defined for the formula, e.g., A corresponds to the observation term coded OBX 1. In formula output unit 53, the output is directed for the formula, as output to an observation term of code OBX 2.

The calculation triggering module 60 is used to define triggering conditions for each of the first calculation formulas. Here, the trigger condition includes an automatic trigger, a periodic trigger, a trigger in other manners, and the like. One or more trigger conditions may be set for a certain first calculation formula. For example, a formula is set to automatically operate when the observation term in the formula is changed for a certain first calculation formula, or a composite condition of automatically operating once every 10 minutes and once at 6 o' clock every day is set for a certain first calculation formula.

The computation runtime module 70 is configured to automatically invoke a corresponding first computation formula according to the trigger condition defined by the computation trigger module 60 to perform correlation computation on the observation items stored in the data storage module 20. As shown in FIG. 4, compute runtime module 70 includes: a general graph generating unit 71, a sub graph generating unit 72, a topology sorting unit 73, a first data obtaining unit 74, a data injecting unit 75, a second data obtaining unit 76, and a formula calculating unit 77.

Specifically, the general graph generating unit 71 is configured to automatically generate one directed acyclic graph as a general graph of all the calculation relationships according to the relationships of the observation terms defined by all the first calculation formulas. The subgraph generation unit 72 is configured to extract a subgraph related to the current computation from the directed acyclic graph according to the observation term involved in a certain first computation formula when the first computation formula is triggered. The topology ranking unit 73 is used to perform topology ranking on the generated subgraphs and determine the computation order of the observations involved. The first data obtaining unit 74 is configured to obtain corresponding numerical class observation terms and dictionary class observation terms from the data storage module 20 according to the model definition of the observation term module 30, and obtain corresponding calculated values of the dictionary class observation terms from the dictionary module 40. The data injection unit 75 is configured to inject the calculated values corresponding to the obtained numeric class observation items and dictionary class observation items into the subgraph. The second data acquisition unit 76 is used to acquire calculation parameters required for calculation. It will be understood that some of the observation terms may be calculated not only depending on other observation terms, but may also include calculation parameters of non-observation terms, such as current ambient temperature, humidity, and atmospheric pressure. The second data acquisition unit 76 is connected to the calculation parameter acquisition device to acquire the relevant calculation parameters in real time. The formula calculating unit 77 is configured to calculate the calculation result of each step in sequence according to the sequence calculated by the topology ranking according to the subgraph of the injection data and the obtained calculation parameters.

As shown in fig. 5, wherein the formula calculating unit 77 includes: a syntax parsing subunit 771, a variable subunit 772, an operator subunit 773, a function subunit 774, an evaluation subunit 775, and a result derivation unit 776. The parsing subunit 771 is used to parse the triggered first calculation formula to generate a syntax tree. The variable subunit 772 is used to replace the variables in the first calculation formula with corresponding data. The operator sub-unit 773 is used to define the meaning of the operator in the first calculation formula. Function subunit 774 is used to define the meaning of the function in the first calculation formula. The evaluation subunit 775 is configured to traverse the syntax tree and compute a root node as an output of the first calculation formula. The result deriving unit 776 is configured to, after all computations are completed, derive all computation results of observation terms in the sub-graph to corresponding observation terms.

It is understood that when one of the first calculation formulas is changed, the general graph generating unit 71 regenerates a directed acyclic graph according to all the latest first formulas. All subsequent automatic computations use the updated directed acyclic graph.

As a preferred embodiment, the calculation formula module 50 is also used to define several second calculation formulas for the correlation calculation between the target term and the observation term, as well as the input and output of each second calculation formula. The abstract formula unit 51 also stores all the second calculation formulas. The formula input unit 52 is also used to define the input of each second calculation formula. The formula output unit 53 is also used to define the output of each second calculation formula. Here, the target item is different from the observation item, and is a meaningful result calculated from the observation item that is set manually. The second calculation formula does not automatically run, only when the target item needs to be calculated, the corresponding second calculation formula is manually selected, at the moment, the second calculation formula runs, and the target item result is calculated according to the corresponding observation item and the calculation parameter.

The invention also discloses a method for automatically calculating the observation item according to the formula, which comprises the following steps:

(1) a number of observation terms are received, the observation terms including a dictionary-like observation term and a numeric-like observation term.

(2) The received observation items are stored.

(3) Model definition is performed for all observation terms.

The specific method for performing model definition on all the observation items comprises the following steps: general metadata defining the observation item includes the code, name, and data type of the observation item. Non-generic metadata defining observations, including dictionary codes for dictionary class observations and reasonable numerical ranges and decimal places for numerical class observations.

(4) And defining the calculated values corresponding to the observation items of different dictionary classes.

(5) First calculation formulas defining calculation of associations between observation terms and inputs and outputs of each of the first calculation formulas.

The specific method of defining the first calculation formulas of the correlation calculation between the observation terms and the input and output of each first calculation formula is as follows: all the first calculation formulas are edited and stored. The input of each first calculation formula is defined. The output of each first calculation formula is defined.

(6) A trigger condition for each first calculation formula is defined.

(7) And automatically calling a corresponding first calculation formula according to a defined trigger condition to perform correlation calculation on the stored observation items.

Specifically, the specific method for automatically calling the corresponding first calculation formula according to the defined trigger condition to perform the association calculation on the stored observation items includes: and automatically generating a directed acyclic graph as a total graph of all the calculation relations according to the relations of the observation terms defined by all the first calculation formulas. When a certain first calculation formula is triggered, extracting a subgraph related to the current calculation from the directed acyclic graph according to the observation term related to the first calculation formula. And carrying out topological sorting on the generated subgraphs, and determining the calculation order of the related observations. And acquiring corresponding numerical value observation items and dictionary observation items from the stored observation items according to the model definition of all the observation items, and acquiring a calculation value corresponding to the dictionary observation items. And injecting the calculated values corresponding to the acquired numerical value class observation items and the acquired dictionary class observation items into the subgraph. And acquiring calculation parameters required by calculation. And calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the calculated sequence of the topological sequencing.

The specific method for calculating the calculation result of each step in sequence according to the subgraph of the injection data and the obtained calculation parameters and the sequence calculated by topological sorting comprises the following steps: and parsing the triggered first calculation formula to generate a syntax tree. And replacing the variables in the first calculation formula with corresponding data. And traversing the syntax tree and calculating a root node as the output of the calculation formula according to the operator meaning and the function meaning in the calculation formula. And after all the calculation is finished, exporting calculation results of all the observation items in the subgraph to the corresponding observation items.

As a preferred embodiment, the method of automatically calculating the observation term according to the formula further includes:

(8) a number of second calculation formulas defining an association calculation between the target item and the observation item, and an input and an output of each second calculation formula.

(9) And selecting a corresponding observation item from the stored observation items according to a selected certain second calculation formula to calculate to obtain a corresponding target item.

The foregoing illustrates and describes the principles, general features, and advantages of the present invention. It should be understood by those skilled in the art that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by using equivalent alternatives or equivalent variations fall within the scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:识别专有名词的系统和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!