WO2022011837A1 - 根据公式自动计算观察项的装置及方法 - Google Patents

根据公式自动计算观察项的装置及方法 Download PDF

Info

Publication number
WO2022011837A1
WO2022011837A1 PCT/CN2020/117459 CN2020117459W WO2022011837A1 WO 2022011837 A1 WO2022011837 A1 WO 2022011837A1 CN 2020117459 W CN2020117459 W CN 2020117459W WO 2022011837 A1 WO2022011837 A1 WO 2022011837A1
Authority
WO
WIPO (PCT)
Prior art keywords
calculation
observation
formula
items
item
Prior art date
Application number
PCT/CN2020/117459
Other languages
English (en)
French (fr)
Inventor
李超
周寿林
程宗星
孙丛兵
Original Assignee
浙江赢康医疗科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江赢康医疗科技有限公司 filed Critical 浙江赢康医疗科技有限公司
Publication of WO2022011837A1 publication Critical patent/WO2022011837A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/374Thesaurus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records

Definitions

  • the invention relates to the technical field of medical information processing, in particular to a device and method for automatically calculating observation items according to formulas.
  • observation information may come from manual records of nursing staff, may be collected by medical equipment, or may come from other information systems such as hospital management systems, laboratory information systems, and electronic doctor order systems.
  • Observation information has the characteristics of high complexity and strong correlation. For example, clinical scoring needs to extract observation data from many data sources, perform calculation and summary, and then map it to the final score. There are many interdependent calculation relationships between observations. In addition, the relationship between the observation items will have requirements that change with the application scenario, which requires the calculation formula to have a certain degree of configurability.
  • inconsistent information sources often result in inconsistent information calibers, thereby reducing the relevance and availability of data.
  • the correlation calculation between observations often relies on the hard coding of the information system, which cannot meet the needs of users for data recording and analysis of observations. Therefore, it is very necessary to provide an observation item data computing device that can be flexibly configured.
  • the invention provides a device and method for automatically calculating observation items according to a formula, and adopts the following technical solutions:
  • An apparatus for automatically calculating observations based on formulas comprising:
  • the data receiving module is used to receive several observation items, and the observation items include dictionary observation items and numerical observation items;
  • a data storage module for storing the received observations
  • the dictionary module is used to define the calculated values corresponding to different dictionary observations
  • a calculation formula module used to define several first calculation formulas for the correlation calculation between the observation items and the input and output of each first calculation formula
  • a calculation trigger module used to define the trigger condition of each first calculation formula
  • the calculation runtime module is configured to automatically invoke the corresponding first calculation formula to perform associated calculation on the observation items stored in the data storage module according to the trigger conditions defined by the calculation trigger module.
  • computing runtime module includes:
  • the overall graph generation unit is used to automatically generate a directed acyclic graph according to the relationship of the observation items defined by all the first calculation formulas, as the overall graph of all calculation relationships;
  • a subgraph generating unit used for extracting a subgraph relevant to the current calculation from the directed acyclic graph according to the observation items involved in the first calculation formula when a certain first calculation formula is triggered;
  • the topological sorting unit is used to perform topological sorting on the generated subgraph, and determine the calculation order of the observation items involved;
  • a first data acquisition unit configured to acquire corresponding numerical observation items and dictionary observation items from the data storage module according to the model definition of the observation item module, and acquire the calculated values corresponding to the dictionary observation items from the dictionary module;
  • the data injection unit is used to inject the calculated values corresponding to the obtained numerical observation items and dictionary observation items into the subgraph;
  • the second data acquisition unit is used to acquire the calculation parameters required for calculation
  • the formula calculation unit is used to sequentially calculate the calculation result of each step according to the sub-graph of the injected data and the obtained calculation parameters according to the order calculated by the topological sorting.
  • the formula calculation unit includes:
  • a syntax parsing subunit configured to perform syntax analysis on the triggered first calculation formula to generate a syntax tree
  • variable subunit used to replace the variable in the first calculation formula with corresponding data
  • the operator subunit is used to define the meaning of the operator in the first calculation formula
  • the evaluation subunit is used to traverse the syntax tree and calculate the root node as the output of the first calculation formula
  • the result deriving unit after all computations are completed, derives the calculation results of all the observation items in the sub-graph to the corresponding observation items.
  • observation module includes:
  • Observation base model unit used to define the general metadata of the observation, including the code, name, data type and default value of the observation;
  • Observation additional model unit which is used to define the non-generic metadata of the observation, including the dictionary code of the dictionary observation and the reasonable value range and decimal point of the numerical observation;
  • the calculation formula module includes:
  • the formula output unit is used to define the output of each first calculation formula.
  • calculation formula module is also used to define several second calculation formulas for the correlation calculation between the target item and the observation item and the input and output of each second calculation formula;
  • the abstract formula unit also stores all second calculation formulas
  • the formula input unit is also used to define the input of each second calculation formula
  • the formula output unit is also used to define the output of each second calculation formula.
  • a method for automatically calculating observations based on formulas consisting of the following steps:
  • the corresponding first calculation formula is automatically invoked to perform associated calculation on the stored observation items.
  • a directed acyclic graph is automatically generated as a general graph of all calculation relationships
  • the calculation result of each step is calculated successively according to the order calculated by topological sorting.
  • the specific method for successively calculating the calculation result of each step is as follows:
  • the specific method for defining the first calculation formula of the correlation calculation between the observation items and the input and output of each first calculation formula is:
  • the method for automatically calculating the observation item according to the formula also includes:
  • a corresponding observation item is selected from the stored observation items for calculation to obtain a corresponding target item.
  • the advantages of the present invention lie in that the device and method for automatically calculating the observation items according to the formula are provided, the observation items are model defined, the corresponding calculation values are set for the dictionary observation items, and the association between the observation items is defined For the calculated first calculation formulas, the trigger condition of each first calculation formula is set, and according to the above settings, automatic correlation calculation is automatically performed on the input observation items.
  • Fig. 1 is the schematic diagram of the device for automatically calculating the observation item according to the formula of the present invention
  • Fig. 2 is the schematic diagram of the observation item module of the present invention.
  • Fig. 3 is the schematic diagram of the calculation formula module of the present invention.
  • Fig. 4 is the schematic diagram of the computing runtime module of the present invention.
  • Fig. 5 is the schematic diagram of formula calculation unit of the present invention.
  • Data receiving module 10 data storage module 20, observation item module 30, observation item basic model unit 31, observation item additional model unit 32, dictionary module 40, calculation formula module 50, abstract formula unit 51, formula input unit 52, formula output unit 53, calculation trigger module 60, calculation runtime module 70, overall graph generation unit 71, subgraph generation unit 72, topological sorting unit 73, first data acquisition unit 74, data injection unit 75, second data acquisition unit 76, Formula calculation unit 77 , syntax parsing subunit 771 , variable subunit 772 , operator subunit 773 , function subunit 774 , evaluation subunit 775 , and result deriving unit 776 .
  • observation items mainly refer to data related to the patient itself, such as vital signs, medication measurement, intake and output statistics and clinical scores. Wait. It mainly includes: a data receiving module 10 , a data storage module 20 , an observation module 30 , a dictionary module 40 , a calculation formula module 50 , a calculation trigger module 60 and a calculation runtime module 70 .
  • the data receiving module 10 is used for receiving several observation items. Observations include dictionary-type observations and numeric-type observations. Numerical observations represent observations that can be described with numbers, such as "blood pressure: 125", where blood pressure is a numeric observation.
  • a dictionary observation item is a textual description type observation item, which is used to express a certain observation item of the patient through a textual description, compared with a certain "verbal response option: correct answer.”, and the verbal response is a dictionary type observation item.
  • the data sources of the data receiving module 10 include, but are not limited to, manual record input, medical equipment collection, hospital management system, laboratory information system, electronic doctor order system, and the like. Therefore, the data receiving module 10 of the present invention is connected to one or more of external data entry equipment, medical collection equipment, hospital management system, laboratory information system and electronic doctor order system to obtain observation item data.
  • the data storage module 20 is used to store the received observations.
  • the observation item module 30 is used for model definition for all the observation items, for providing a unified and complete model definition and data specification for all the observation items in the system, and providing the underlying model support for the observation item association computing system.
  • the observation item module 30 includes: an observation item basic model unit 31 and an observation item additional model unit 32 .
  • the observation item basic 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 definition of the general metadata of the observation item.
  • the observation item additional model unit 32 is used to define the non-universal metadata of the observation item, including the dictionary code of the dictionary type observation item and the reasonable numerical range and number of decimal places of the numerical type observation item, so as to provide support for the definition of the non-universal metadata of the observation item.
  • the dictionary module 40 is used to define the calculated values corresponding to different dictionary observation items.
  • observations include dictionary observations and numerical observations
  • dictionary observations are described by text and cannot be calculated publicly. Therefore, in order to facilitate formula calculation, several dictionaries, dictionary entries included in each dictionary, and calculated values corresponding to each dictionary entry are defined by the dictionary module 40 .
  • dictionary entries included in each dictionary, and calculated values corresponding to each dictionary entry are defined by the dictionary module 40 .
  • the dictionary module 40 stores all used dictionaries. In this way, when the observation item is a dictionary-type observation item, its corresponding calculated value can be found from the dictionary module 40 according to the model definition of the observation item module 30 .
  • the calculation formula module 50 is used to define several first calculation formulas for the correlation calculation between the observation items and the input and output of each first calculation formula.
  • 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 to edit and store 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 can be used in the first calculation formula, and the variables in the formula are replaced by placeholders, such as MAX( ⁇ A ⁇ , ⁇ B ⁇ )+ ⁇ C ⁇ /2.
  • the relevant input is defined for the formula, for example, ⁇ A ⁇ corresponds to the observation item with the code OBX1.
  • the formula output unit 53 the formula is oriented to output, such as output to the observation item whose code is OBX2.
  • the calculation trigger module 60 is used to define the trigger condition of each first calculation formula.
  • the triggering conditions include automatic triggering, periodic triggering, and triggering in other ways.
  • One or more trigger conditions can be set for a certain first calculation formula. For example, set a first calculation formula to automatically run the formula when the observation item in the calculation formula changes, or set a first calculation formula to automatically run once every 10 minutes and run once a day at 6:00. composite conditions.
  • the calculation runtime module 70 is configured to automatically call the corresponding first calculation formula according to the trigger condition defined by the calculation trigger module 60 to perform associated calculation on the observation items stored in the data storage module 20 .
  • the calculation runtime module 70 includes: a general graph generation unit 71 , a subgraph generation unit 72 , a topological sorting unit 73 , a first data acquisition unit 74 , a data injection unit 75 , a second data acquisition unit 76 , and a formula calculation unit 77 .
  • the overall graph generation unit 71 is configured to automatically generate a directed acyclic graph according to the relationships of all the observation items defined by the first calculation formula, as the overall graph of all the calculation relationships.
  • the subgraph generating unit 72 is configured to extract a subgraph related to the current calculation from the directed acyclic graph according to the observation items involved in the first calculation formula when a certain first calculation formula is triggered.
  • the topological sorting unit 73 is configured to perform topological sorting on the generated subgraph, and determine the calculation order of the involved observation items.
  • the first data acquisition unit 74 is configured to acquire the corresponding numerical observation items and dictionary observation items from the data storage module 20 according to the model definition of the observation item module 30 , and obtain the corresponding dictionary observation items from the dictionary module 40 . Calculated.
  • the data injection unit 75 is configured to inject the acquired calculated values corresponding to the numerical observation items and the dictionary observation items into the subgraph.
  • the second data acquisition unit 76 is used to acquire calculation parameters required for calculation. It is understandable that the calculation of some observation items not only depends on several other observation items, but may also include calculation parameters of non-observation items, such as the current ambient temperature, humidity and atmospheric pressure and other parameters.
  • the second data acquisition unit 76 is connected to the calculation parameter acquisition device to acquire relevant calculation parameters in real time.
  • the formula calculation unit 77 is configured to successively calculate the calculation result of each step according to the sub-graph of the injected data and the obtained calculation parameters in the order calculated by the topological sorting.
  • the formula calculation 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 deriving unit 776 .
  • the syntax parsing subunit 771 is configured to perform syntax analysis on the triggered first calculation formula to generate a syntax tree.
  • the variable subunit 772 is used to replace the variable in the first calculation formula with corresponding data.
  • the operator subunit 773 is used to define the meaning of the operator in the first calculation formula.
  • the function subunit 774 is used to define the meaning of the function in the first calculation formula.
  • the evaluation subunit 775 is used to traverse the syntax tree and calculate the root node as the output of the first calculation formula.
  • the result deriving unit 776 is configured to export the calculation results of all the observation items in the sub-graph to the corresponding observation items after all calculations are completed.
  • the overall graph generating unit 71 will regenerate a directed acyclic graph according to all the latest first formulas. All subsequent automatic computations use the updated DAG.
  • the calculation formula module 50 is further configured to define several second calculation formulas for the correlation calculation between the target item and the observation item, and the input and output of each second calculation formula.
  • the abstract formula unit 51 also stores all 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.
  • the target item is different from the observation item, which is a meaningful result calculated by the observation item that is manually set.
  • the second calculation formula does not run automatically. Only when the target item needs to be calculated, the corresponding second calculation formula is manually selected. At this time, the second calculation formula runs, and the target item result is calculated according to the corresponding observation item and calculation parameters.
  • the invention also discloses a method for automatically calculating an observation item according to a formula, comprising the following steps:
  • observation items include dictionary observation items and numerical observation items.
  • the specific method of model definition for all observations is to define the general metadata of the observation, including the code, name and data type of the observation. Defines non-generic metadata for observations, including dictionary codes for dictionary observations and reasonable numerical ranges and decimal places for numeric observations.
  • a specific method for defining the first calculation formula of the correlation calculation between the observation items and the input and output of each first calculation formula is: editing and storing all the first calculation formulas. Define the inputs for each first calculation formula. Define the output of each first calculation formula.
  • the corresponding first calculation formula is automatically invoked to perform associated calculation on the stored observation items.
  • the specific method for automatically invoking the corresponding first calculation formula to perform the associated calculation on the stored observation items according to the defined trigger conditions is: according to the relationship of the observation items defined by all the first calculation formulas, automatically generate a directed A ring graph, as a general graph of all computed relationships.
  • a subgraph related to the current calculation is extracted from the directed acyclic graph according to the observation items involved in the first calculation formula.
  • the corresponding numerical observations and dictionary observations are obtained from the stored observations, and the computed values corresponding to the dictionary observations are obtained.
  • the specific method for successively calculating the calculation result of each step according to the sub-graph of the injected data and the obtained calculation parameters according to the order calculated by topological sorting is: perform syntax analysis on the triggered first calculation formula to generate a syntax tree. Replace the variables in the first calculation formula with the corresponding data. According to the meaning of operators and functions in the calculation formula, traverse the syntax tree and calculate the root node as the output of the calculation formula. After all calculations are completed, the calculation results of all observations in the subgraph are exported to the corresponding observations.
  • the method for automatically calculating the observation item according to the formula also includes:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Epidemiology (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Algebra (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种根据公式自动计算观察项的装置及方法,该装置包括:数据接收模块(10);数据存储模块(20);观察项模块(30),对观察项进行模型定义;字典模块(40),定义字典类观察项的计算值;计算公式模块(50),定义观察项之间的关联计算的若干第一计算公式;计算触发模块(60),定义每一个第一计算公式的触发条件;计算运行时模块(70),根据计算触发模块(60)定义的触发条件自动调用对应的第一计算公式对数据存储模块(20)中存储的观察项进行关联计算。该方法包括:对观察项进行模型定义,对字典类观察项设定对应的计算值,设定观察项之间的关联计算的若干第一计算公式,设定每个第一计算公式的触发条件,自动对输入的观察项进行关联计算。

Description

根据公式自动计算观察项的装置及方法 技术领域
本发明涉及医疗信息处理技术领域,尤其涉及一种根据公式自动计算观察项的装置及方法。
背景技术
随着医疗信息化技术的不断发展,患者临床观察项记录已经大量依赖于信息系统,例如生命体征、给药计量、出入量统计、临床评分。观察项信息来源多种多样,可能来自护理人员手动记录,可能由医疗设备采集,也有可能来自其他信息系统如医院管理系统、检验科信息系统、电子医嘱系统。
观察项信息具有复杂度高和相关性强的特点,例如临床评分需要从很多数据来源提取观察项数据,进行计算汇总然后映射到最终评分,观察项之间存在多种相互依赖的计算关系。另外,观察项之间的关系会存在随着应用场景变化的需求,这就要求计算公式有着一定的可配置性。
现有技术中,信息来源不一致经常会造成信息的口径不统一,从而降低数据的相关性和可利用率。观察项之间的关联计算往往依赖于信息系统的硬编码来实现,不能满足用户对观察项数据记录和分析的需求。因此提供一种可以灵活配置的观察项数据计算装置是非常有必要的。
发明内容
本发明提供了一种根据公式自动计算观察项的装置及方法,采用如下的技术方案:
一种根据公式自动计算观察项的装置,包含:
数据接收模块,用于接收若干观察项,观察项包含字典类观察项和数值类观察项;
数据存储模块,用于存储接收到的观察项;
观察项模块,用于对所有观察项进行模型定义;
字典模块,用于定义不同字典类观察项所对应的计算值;
计算公式模块,用于定义观察项之间的关联计算的若干第一计算公式以及每个第一计算公式的输入和输出;
计算触发模块,用于定义每一个第一计算公式的触发条件;
计算运行时模块,用于根据计算触发模块定义的触发条件自动调用对应的第一计算公式对数据存储模块中存储的观察项进行关联计算。
进一步地,计算运行时模块包括:
总图生成单元,用于根据所有第一计算公式定义的观察项的关系,自动生成一张有向无 环图,作为所有计算关系的总图;
子图生成单元,用于在某一第一计算公式被触发时根据这一第一计算公式涉及到的观察项从有向无环图中提取出与当前计算相关的子图;
拓扑排序单元,用于对生成的子图进行拓扑排序,确定涉及到的观察项的计算顺序;
第一数据获取单元,用于根据观察项模块的模型定义从数据存储模块中获取对应的数值类观察项和字典类观察项,并从字典模块中获取到字典类观察项所对应的计算值;
数据注入单元,用于将获取到的数值类观察项和字典类观察项所对应的计算值注入到子图中;
第二数据获取单元,用于获取计算所需的计算参数;
公式计算单元,用于根据注入数据的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
进一步地,公式计算单元包括:
语法解析子单元,用于对触发的第一计算公式进行语法分析生成语法树;
变量子单元,用于将第一计算公式中的变量替换为对应的数据;
运算符子单元,用于定义第一计算公式中的运算符含义;
函数子单元,用于定义第一计算公式中的函数的含义;
求值子单元,用于遍历语法树并计算出根节点作为第一计算公式的输出;
结果导出单元,在所有计算完毕之后,将子图中所有的观察项计算结果导出到对应的观察项。
进一步地,观察项模块包括:
观察项基础模型单元,用于定义观察项的通用元数据,包括观察项的代码、名称、数据类型和默认值;
观察项附加模型单元,用于定义观察项的非通用元数据,包括字典类观察项的字典代码以及数值类观察项的合理数值范围和小数点位数;
计算公式模块包括:
抽象公式单元,用于编辑并存储所有第一计算公式;
公式输入单元,用于定义每个第一计算公式的输入;
公式输出单元,用于定义每个第一计算公式的输出。
进一步地,计算公式模块还用于定义目标项与观察项之间的关联计算的若干第二计算公式以及每个第二计算公式的输入和输出;
抽象公式单元还存储所有第二计算公式;
公式输入单元还用于定义每个第二计算公式的输入;
公式输出单元还用于定义每个第二计算公式的输出。
一种根据公式自动计算观察项的方法,包含以下步骤:
接收若干观察项,观察项包含字典类观察项和数值类观察项;
存储接收到的观察项;
对所有观察项进行模型定义;
定义不同字典类观察项所对应的计算值;
定义观察项之间的关联计算的第一计算公式以及每个第一计算公式的输入和输出;
定义每一个第一计算公式的触发条件;
根据定义的触发条件自动调用对应的第一计算公式对存储的观察项进行关联计算。
进一步地,根据定义的触发条件自动调用对应的第一计算公式对存储的观察项进行关联计算的具体方法为:
根据所有第一计算公式定义的观察项的关系,自动生成一张有向无环图,作为所有计算关系的总图;
在某一第一计算公式被触发时根据这一第一计算公式涉及到的观察项从有向无环图中提取出与当前计算相关的子图;
对生成的子图进行拓扑排序,确定涉及到的观察项的计算顺序;
根据对所有观察项进行的模型定义从存储的观察项中获取对应的数值类观察项和字典类观察项,并获取字典类观察项所对应的计算值;
将获取到的数值类观察项和字典类观察项所对应的计算值注入到子图中;
获取计算所需的计算参数;
根据注入数据的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
进一步地,根据注入数据的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果的具体方法为:
对触发的第一计算公式进行语法分析生成语法树;
将第一计算公式中的变量替换为对应的数据;
根据计算公式中运算符含义和函数的含义,遍历语法树并计算出根节点作为计算公式的输出;
在所有计算完毕之后,将子图中所有的观察项计算结果导出到对应的观察项。
进一步地,对所有观察项进行模型定义的具体方法为:
定义观察项的通用元数据,包括观察项的代码、名称和数据类型;
定义观察项的非通用元数据,包括字典类观察项的字典代码以及数值类观察项的合理数值范围和小数点位数;
定义观察项之间的关联计算的第一计算公式以及每个第一计算公式的输入和输出的具体方法为:
编辑并存储所有第一计算公式;
定义每个第一计算公式的输入;
定义每个第一计算公式的输出。
进一步地,根据公式自动计算观察项的方法还包括:
定义目标项与观察项之间的关联计算的若干第二计算公式以及每个第二计算公式的输入和输出;
根据选择的某一第二计算公式从存储的观察项中选择对应的观察项进行计算得到对应的目标项。
本发明的有益之处在于所提供的根据公式自动计算观察项的装置及方法,对观察项进行模型定义,对其中的字典类观察项设定对应的计算值,并定义观察项之间的关联计算的若干第一计算公式,设定每个第一计算公式的触发条件,根据以上的设定,自动对输入的观察项进行自动关联计算。
附图说明
图1是本发明的根据公式自动计算观察项的装置的示意图;
图2是本发明的观察项模块的示意图;
图3是本发明的计算公式模块的示意图;
图4是本发明的计算运行时模块的示意图;
图5是本发明的公式计算单元的示意图;
数据接收模块10,数据存储模块20,观察项模块30,观察项基础模型单元31,观察项附加模型单元32,字典模块40,计算公式模块50,抽象公式单元51,公式输入单元52,公式输出单元53,计算触发模块60,计算运行时模块70,总图生成单元71,子图生成单元72,拓扑排序单元73,第一数据获取单元74,数据注入单元75,第二数据获取单元76,公式计算单元77,语法解析子单元771,变量子单元772,运算符子单元773,函数子单元774,求值子单元775,结果导出单元776。
具体实施方式
以下结合附图和具体实施例对本发明作具体的介绍。
如图1所示为本发明的一种根据公式自动计算观察项的装置,在本发明中,观察项主要指与患者自身相关的数据,如生命体征、给药计量、出入量统计和临床评分等。其主要包含:数据接收模块10、数据存储模块20、观察项模块30、字典模块40、计算公式模块50、计算触发模块60和计算运行时模块70。
数据接收模块10用于接收若干观察项。观察项包含字典类观察项和数值类观察项。数值类观察项表示可以用数字进行描述的观察项,例如“血压:125”,其中,血压为数值类观察项。字典类观察项为文字类描述型观察项,用于通过文字叙述表示患者的某项观察项,比某“言语反应选项:回答正确。”,言语反应为字典类观察项。
数据接收模块10的数据来源包含但不限于手动记录输入、医疗设备采集、医院管理系统、检验科信息系统和电子医嘱系统等。因此,本发明的数据接收模块10连接至外部数据录入设备、医疗采集设备、医院管理系统、检验科信息系统和电子医嘱系统中的一个或多个进行观察项数据获取。
数据存储模块20用于存储接收到的观察项。
观察项模块30用于对所有观察项进行模型定义,用于给系统中所有的观察项提供一个统一完备的模型定义和数据规范,给观察项关联计算系统提供底层模型支持。具体的,如图2所示,观察项模块30包括:观察项基础模型单元31和观察项附加模型单元32。观察项基础模型单元31用于定义观察项的通用元数据,包括观察项的代码、名称、数据类型和默认值,为观察项通用元数据定义提供支持。观察项附加模型单元32用于定义观察项的非通用元数据,包括字典类观察项的字典代码以及数值类观察项的合理数值范围和小数点位数,为观察项非通用元数据定义提供支持。
字典模块40用于定义不同字典类观察项所对应的计算值。前述提到,观察项包含字典类观察项和数值类观察项,而字典类观察项由文字描述,无法进行公示计算。因此,为了便于公式计算,通过字典模块40定义若干字典、每个字典包含的字典条目以及每个字典条目对应的计算值。比如对应字典“言语反应选项”,其下对应有“回答正确、回答错乱、语无伦次、含糊不清和无反应”5个字典条目,其中“回答正确”对应的计算值为5,“回答错乱”对应的计算值为4,“语无伦次”对应的计算值为3,“含糊不清”对应的计算值为2,“无反应”对应的计算值为1。以此类推,字典模块40中存储有所有用到的字典。这样,当观察项是字典类观察项时,能够根据观察项模块30的模型定义,从字典模块40中找到其对应计算值。
计算公式模块50用于定义观察项之间的关联计算的若干第一计算公式以及每个第一计算公式的输入和输出。具体而言,如图3所示,计算公式模块50包括:抽象公式单元51、公式输入单元52和公式输出单元53。抽象公式单元51用于编辑并存储所有第一计算公式。 公式输入单元52用于定义每个第一计算公式的输入。公式输出单元53用于定义每个第一计算公式的输出。第一计算公式中可以使用Excel表达式、逻辑和数学运算符,公式中的变量通过占位符代替,如MAX({A},{B})+{C}/2。在公式输入单元52中,为公式定义相关的输入,如{A}对应到代码为OBX1的观察项。在公式输出单元53中,为公式定向输出,如输出到代码为OBX2的观察项。
计算触发模块60用于定义每一个第一计算公式的触发条件。这里,触发条件包括自动触发、周期触发以及其他方式的触发等。可以对某个第一计算公式设定一个或多个触发条件。例如对某个第一计算公式设定为当计算公式中的观察项发生变化时自动运行公式,或对某个第一计算公式设定每间隔10分钟自动运行一次并在每天6点运行一次这样的复合条件。
计算运行时模块70用于根据计算触发模块60定义的触发条件自动调用对应的第一计算公式对数据存储模块20中存储的观察项进行关联计算。如图4所示,计算运行时模块70包括:总图生成单元71、子图生成单元72、拓扑排序单元73、第一数据获取单元74、数据注入单元75、第二数据获取单元76和公式计算单元77。
具体而言,总图生成单元71用于根据所有第一计算公式定义的观察项的关系,自动生成一张有向无环图,作为所有计算关系的总图。子图生成单元72用于在某一第一计算公式被触发时根据这一第一计算公式涉及到的观察项从有向无环图中提取出与当前计算相关的子图。拓扑排序单元73用于对生成的子图进行拓扑排序,确定涉及到的观察项的计算顺序。第一数据获取单元74用于根据观察项模块30的模型定义从数据存储模块20中获取对应的数值类观察项和字典类观察项,并从字典模块40中获取到字典类观察项所对应的计算值。数据注入单元75用于将获取到的数值类观察项和字典类观察项所对应的计算值注入到子图中。第二数据获取单元76用于获取计算所需的计算参数。可以理解的是,有些观察项的计算不仅仅依赖于其他几个观察项,还可能包含非观察项的计算参数,如当前的环境温度、湿度和大气压等参数。第二数据获取单元76连接至计算参数采集设备以实时获取相关计算参数。公式计算单元77用于根据注入数据的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
如图5所示,其中,公式计算单元77包括:语法解析子单元771、变量子单元772、运算符子单元773、函数子单元774、求值子单元775和结果导出单元776。语法解析子单元771用于对触发的第一计算公式进行语法分析生成语法树。变量子单元772用于将第一计算公式中的变量替换为对应的数据。运算符子单元773用于定义第一计算公式中的运算符含义。函数子单元774用于定义第一计算公式中的函数的含义。求值子单元775用于遍历语法树并计算出根节点作为第一计算公式的输出。结果导出单元776用于在所有计算完毕之后,将子图 中所有的观察项计算结果导出到对应的观察项。
可以理解的是,当第一计算公式中的某个发生改变时,总图生成单元71会根据最新的所有第一公式重新生成一张有向无环图。之后的所有自动计算使用更新后的有向无环图。
作为一种优选的实施方式,计算公式模块50还用于定义目标项与观察项之间的关联计算的若干第二计算公式以及每个第二计算公式的输入和输出。抽象公式单元51还存储所有第二计算公式。公式输入单元52还用于定义每个第二计算公式的输入。公式输出单元53还用于定义每个第二计算公式的输出。这里,目标项不同于观察项,是人工设定的由观察项计算得出的有意义的结果。第二计算公式不会自动运行,只有当需要计算目标项时,人工选定对应的第二计算公式,此时,第二计算公式运行,根据对应的观察项以及计算参数计算目标项结果。
本发明还公开了一种根据公式自动计算观察项的方法,包含以下步骤:
(1)接收若干观察项,观察项包含字典类观察项和数值类观察项。
(2)存储接收到的观察项。
(3)对所有观察项进行模型定义。
对所有观察项进行模型定义的具体方法为:定义观察项的通用元数据,包括观察项的代码、名称和数据类型。定义观察项的非通用元数据,包括字典类观察项的字典代码以及数值类观察项的合理数值范围和小数点位数。
(4)定义不同字典类观察项所对应的计算值。
(5)定义观察项之间的关联计算的第一计算公式以及每个第一计算公式的输入和输出。
定义观察项之间的关联计算的第一计算公式以及每个第一计算公式的输入和输出的具体方法为:编辑并存储所有第一计算公式。定义每个第一计算公式的输入。定义每个第一计算公式的输出。
(6)定义每一个第一计算公式的触发条件。
(7)根据定义的触发条件自动调用对应的第一计算公式对存储的观察项进行关联计算。
具体而言,根据定义的触发条件自动调用对应的第一计算公式对存储的观察项进行关联计算的具体方法为:根据所有第一计算公式定义的观察项的关系,自动生成一张有向无环图,作为所有计算关系的总图。在某一第一计算公式被触发时根据这一第一计算公式涉及到的观察项从有向无环图中提取出与当前计算相关的子图。对生成的子图进行拓扑排序,确定涉及到的观察项的计算顺序。根据对所有观察项进行的模型定义从存储的观察项中获取对应的数值类观察项和字典类观察项,并获取字典类观察项所对应的计算值。将获取到的数值类观察项和字典类观察项所对应的计算值注入到子图中。获取计算所需的计算参数。根据注入数据 的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
其中,根据注入数据的子图和获取到的计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果的具体方法为:对触发的第一计算公式进行语法分析生成语法树。将第一计算公式中的变量替换为对应的数据。根据计算公式中运算符含义和函数的含义,遍历语法树并计算出根节点作为计算公式的输出。在所有计算完毕之后,将子图中所有的观察项计算结果导出到对应的观察项。
作为一种优选的实施方式,根据公式自动计算观察项的方法还包括:
(8)定义目标项与观察项之间的关联计算的若干第二计算公式以及每个第二计算公式的输入和输出。
(9)根据选择的某一第二计算公式从存储的观察项中选择对应的观察项进行计算得到对应的目标项。
以上显示和描述了本发明的基本原理、主要特征和优点。本行业的技术人员应该了解,上述实施例不以任何形式限制本发明,凡采用等同替换或等效变换的方式所获得的技术方案,均落在本发明的保护范围内。

Claims (10)

  1. 一种根据公式自动计算观察项的装置,其特征在于,包含:
    数据接收模块,用于接收若干观察项,所述观察项包含字典类观察项和数值类观察项;
    数据存储模块,用于存储接收到的所述观察项;
    观察项模块,用于对所有所述观察项进行模型定义;
    字典模块,用于定义不同所述字典类观察项所对应的计算值;
    计算公式模块,用于定义所述观察项之间的关联计算的若干第一计算公式以及每个所述第一计算公式的输入和输出;
    计算触发模块,用于定义每一个所述第一计算公式的触发条件;
    计算运行时模块,用于根据所述计算触发模块定义的触发条件自动调用对应的所述第一计算公式对数据存储模块中存储的所述观察项进行关联计算。
  2. 根据权利要求1所述的根据公式自动计算观察项的装置,其特征在于,
    所述计算运行时模块包括:
    总图生成单元,用于根据所有所述第一计算公式定义的所述观察项的关系,自动生成一张有向无环图,作为所有计算关系的总图;
    子图生成单元,用于在某一所述第一计算公式被触发时根据这一所述第一计算公式涉及到的所述观察项从所述有向无环图中提取出与当前计算相关的子图;
    拓扑排序单元,用于对生成的所述子图进行拓扑排序,确定涉及到的所述观察项的计算顺序;
    第一数据获取单元,用于根据所述观察项模块的模型定义从所述数据存储模块中获取对应的数值类观察项和字典类观察项,并从所述字典模块中获取到所述字典类观察项所对应的计算值;
    数据注入单元,用于将获取到的所述数值类观察项和所述字典类观察项所对应的计算值注入到所述子图中;
    第二数据获取单元,用于获取计算所需的计算参数;
    公式计算单元,用于根据注入数据的子图和获取到的所述计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
  3. 根据权利要求2所述的根据公式自动计算观察项的装置,其特征在于,
    所述公式计算单元包括:
    语法解析子单元,用于对触发的所述第一计算公式进行语法分析生成语法树;
    变量子单元,用于将所述第一计算公式中的变量替换为对应的数据;
    运算符子单元,用于定义所述第一计算公式中的运算符含义;
    函数子单元,用于定义所述第一计算公式中的函数的含义;
    求值子单元,用于遍历所述语法树并计算出根节点作为所述第一计算公式的输出;
    结果导出单元,用于在所有计算完毕之后,将子图中所有的观察项计算结果导出到对应的所述观察项。
  4. 根据权利要求1所述的根据公式自动计算观察项的装置,其特征在于,
    所述观察项模块包括:
    观察项基础模型单元,用于定义所述观察项的通用元数据,包括所述观察项的代码、名称、数据类型和默认值;
    观察项附加模型单元,用于定义所述观察项的非通用元数据,包括所述字典类观察项的字典代码以及所述数值类观察项的合理数值范围和小数点位数;
    所述计算公式模块包括:
    抽象公式单元,用于编辑并存储所有所述第一计算公式;
    公式输入单元,用于定义每个所述第一计算公式的输入;
    公式输出单元,用于定义每个所述第一计算公式的输出。
  5. 根据权利要求4所述的根据公式自动计算观察项的装置,其特征在于,
    所述计算公式模块还用于定义目标项与所述观察项之间的关联计算的若干第二计算公式以及每个所述第二计算公式的输入和输出;
    所述抽象公式单元还存储所有所述第二计算公式;
    所述公式输入单元还用于定义每个所述第二计算公式的输入;
    所述公式输出单元还用于定义每个所述第二计算公式的输出。
  6. 一种根据公式自动计算观察项的方法,其特征在于,包含以下步骤:
    接收若干观察项,所述观察项包含字典类观察项和数值类观察项;
    存储接收到的所述观察项;
    对所有所述观察项进行模型定义;
    定义不同所述字典类观察项所对应的计算值;
    定义所述观察项之间的关联计算的第一计算公式以及每个所述第一计算公式的输入和输出;
    定义每一个所述第一计算公式的触发条件;
    根据定义的触发条件自动调用对应的所述第一计算公式对存储的所述观察项进行关联计算。
  7. 根据权利要求6所述的根据公式自动计算观察项的方法,其特征在于,
    所述根据定义的触发条件自动调用对应的所述第一计算公式对存储的所述观察项进行关联计算的具体方法为:
    根据所有所述第一计算公式定义的所述观察项的关系,自动生成一张有向无环图,作为所有计算关系的总图;
    在某一所述第一计算公式被触发时根据这一所述第一计算公式涉及到的所述观察项从所述有向无环图中提取出与当前计算相关的子图;
    对生成的所述子图进行拓扑排序,确定涉及到的所述观察项的计算顺序;
    根据对所有所述观察项进行的模型定义从存储的所述观察项中获取对应的数值类观察项和字典类观察项,并获取所述字典类观察项所对应的计算值;
    将获取到的所述数值类观察项和所述字典类观察项所对应的计算值注入到所述子图中;
    获取计算所需的计算参数;
    根据注入数据的子图和获取到的所述计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果。
  8. 根据权利要求7所述的根据公式自动计算观察项的方法,其特征在于,
    所述根据注入数据的子图和获取到的所述计算参数,按照拓扑排序计算出的顺序,先后计算出每一步的计算结果的具体方法为:
    对触发的所述第一计算公式进行语法分析生成语法树;
    将所述第一计算公式中的变量替换为对应的数据;
    根据所述计算公式中运算符含义和函数的含义,遍历所述语法树并计算出根节点作为所述计算公式的输出;
    在所有计算完毕之后,将子图中所有的观察项计算结果导出到对应的所述观察项。
  9. 根据权利要求6所述的根据公式自动计算观察项的方法,其特征在于,
    所述对所有所述观察项进行模型定义的具体方法为:
    定义所述观察项的通用元数据,包括所述观察项的代码、名称和数据类型;
    定义所述观察项的非通用元数据,包括所述字典类观察项的字典代码以及所述数值类观察项的合理数值范围和小数点位数;
    所述定义所述观察项之间的关联计算的第一计算公式以及每个所述第一计算公式的输入和输出的具体方法为:
    编辑并存储所有所述第一计算公式;
    定义每个所述第一计算公式的输入;
    定义每个所述第一计算公式的输出。
  10. 根据权利要求9所述的根据公式自动计算观察项的方法,其特征在于,
    所述根据公式自动计算观察项的方法还包括:
    定义目标项与所述观察项之间的关联计算的若干第二计算公式以及每个所述第二计算公式的输入和输出;
    根据选择的某一所述第二计算公式从存储的所述观察项中选择对应的所述观察项进行计算得到对应的所述目标项。
PCT/CN2020/117459 2020-07-15 2020-09-24 根据公式自动计算观察项的装置及方法 WO2022011837A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010680065.0A CN111797619B (zh) 2020-07-15 2020-07-15 根据公式自动计算观察项的装置及方法
CN202010680065.0 2020-07-15

Publications (1)

Publication Number Publication Date
WO2022011837A1 true WO2022011837A1 (zh) 2022-01-20

Family

ID=72807132

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117459 WO2022011837A1 (zh) 2020-07-15 2020-09-24 根据公式自动计算观察项的装置及方法

Country Status (2)

Country Link
CN (1) CN111797619B (zh)
WO (1) WO2022011837A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569184A (zh) * 2021-07-16 2021-10-29 众安在线财产保险股份有限公司 可配置的数据计算方法、装置、设备及计算机可读介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140026125A1 (en) * 2012-07-23 2014-01-23 Infosys Llimited Methods for generating software test input data and devices thereof
CN104765810A (zh) * 2015-04-02 2015-07-08 西安电子科技大学 基于布尔矩阵的诊疗规则挖掘方法
CN107785074A (zh) * 2017-10-27 2018-03-09 上海利连信息科技有限公司 一种基于规则推理引擎的疾病辅助判别方法和系统
CN109582349A (zh) * 2018-12-05 2019-04-05 深圳开立生物医疗科技股份有限公司 测量公式的设置方法及装置、测量方法及装置
CN111274267A (zh) * 2019-12-31 2020-06-12 杭州量之智能科技有限公司 一种数据库查询方法、装置及计算机可读取存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140026125A1 (en) * 2012-07-23 2014-01-23 Infosys Llimited Methods for generating software test input data and devices thereof
CN104765810A (zh) * 2015-04-02 2015-07-08 西安电子科技大学 基于布尔矩阵的诊疗规则挖掘方法
CN107785074A (zh) * 2017-10-27 2018-03-09 上海利连信息科技有限公司 一种基于规则推理引擎的疾病辅助判别方法和系统
CN109582349A (zh) * 2018-12-05 2019-04-05 深圳开立生物医疗科技股份有限公司 测量公式的设置方法及装置、测量方法及装置
CN111274267A (zh) * 2019-12-31 2020-06-12 杭州量之智能科技有限公司 一种数据库查询方法、装置及计算机可读取存储介质

Also Published As

Publication number Publication date
CN111797619A (zh) 2020-10-20
CN111797619B (zh) 2024-04-09

Similar Documents

Publication Publication Date Title
CN111767410B (zh) 临床医疗知识图谱的构建方法、装置、设备及存储介质
CN111370127B (zh) 一种基于知识图谱的跨科室慢性肾病早期诊断决策支持系统
CN111986770B (zh) 药方用药审核方法、装置、设备及存储介质
CN109670054B (zh) 知识图谱构建方法、装置、存储介质及电子设备
CN111341456B (zh) 糖尿病足知识图谱生成方法、装置及可读存储介质
CN112528660B (zh) 处理文本的方法、装置、设备、存储介质和程序产品
CN110299209B (zh) 相似病历查找方法、装置、设备及可读存储介质
JP2014228907A (ja) 情報構造化システム
CN111292848A (zh) 一种基于贝叶斯估计的医疗知识图谱辅助推理方法
WO2013144220A1 (en) A method and apparatus for computer assisted innovation
US9754083B2 (en) Automatic creation of clinical study reports
WO2021151302A1 (zh) 基于机器学习的药品质控分析方法、装置、设备及介质
JP2012511767A (ja) オントロジーから関係データベースを作成するための方法及びモジュール
WO2022011837A1 (zh) 根据公式自动计算观察项的装置及方法
US20210202111A1 (en) Method of classifying medical records
CN112071431B (zh) 基于深度学习和知识图谱的临床路径自动生成方法及系统
CN117076742A (zh) 数据血缘追踪方法、装置及电子设备
Satti et al. Semantic bridge for resolving healthcare data interoperability
CN115080594A (zh) 一种对数据进行多维度分析方法、系统和电子设备
US20230377697A1 (en) System and a way to automatically monitor clinical trials - virtual monitor (vm) and a way to record medical history
CN112766779B (zh) 信息处理方法、计算机设备及存储介质
CN114927180A (zh) 病历结构化方法、装置及存储介质
Asif et al. Using nanopublications to detect and explain contradictory research claims
JP2014229078A (ja) 自然言語推論システム、自然言語推論方法及びプログラム
EP3654339A1 (en) Method of classifying medical records

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20945001

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20945001

Country of ref document: EP

Kind code of ref document: A1