Clinical definition data processing method and system with multi-view homogeneous synchronization

By using a multi-view, same-source, and synchronized clinical definition data processing method and system, the problems of fragmentation and caliber drift in the semantic rules of data defined by medical business experts have been solved. This enables medical business experts to directly participate in the definition, automatically synchronize changes at each editing entry point, and generate executable query statements, thereby improving the efficiency and consistency of data definition.

CN123115272APending Publication Date: 2026-11-17联通数智医疗科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611300740.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, the various stages of defining data semantic rules by medical business experts are fragmented, leading to misunderstandings and shifts in terminology. Furthermore, the medical nomenclature set cannot be uniformly referenced or automatically synchronized, resulting in poor maintainability of semantic rules.

Method used

This invention provides a method and system for processing clinical definition data with multiple views and synchronous processing. It obtains DSL clinical definition data from medical business experts through table editing, DSL text editing, and LLM natural language editing portals, converts it into a unified DSL clinical definition text, and stores it in the DSL text presentation layer as the sole authoritative source. This achieves bidirectional synchronous processing of multiple views, automatically synchronizes changes in each editing portal, and generates executable data query statements through DSL compilation and conversion.

Benefits of technology

It solves the problem that medical business experts cannot directly participate in semantic definition, eliminates comprehension bias and terminology drift, realizes fully automatic conversion from semantic definition to executable query, improves the efficiency and consistency of data definition, and ensures unified reference and automatic synchronization of medical nomenclature terminology sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115272A_ABST
    Figure CN123115272A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for processing clinical definition data with multiple views and synchronous processing. The method includes: acquiring DSL clinical definition data submitted via tables, DSL text, or LLM natural language editing entry points; converting it into a unified DSL clinical definition text and writing it into the DSL text presentation layer as the sole authoritative source, with all editing entry points being different views of the authoritative source, and changes in any form automatically synchronized to the corresponding views in other forms; the DSL clinical definition contains a set of concept definitions that can be independently declared, named, and versioned, with a matching global reference syntax for direct cross-definition reference, and all reference points automatically taking effect after member changes; responding to requests, reading the DSL clinical definition text from the presentation layer and presenting it in the corresponding view; compiling and generating executable query statements, sending them to the target data engine for execution, and outputting query results through a service interface; solving the problems of fragmented entry points, definition drift, and low efficiency of manual translation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of clinical data processing technology, and in particular to a method and system for processing clinical definition data with multiple views and synchronous processing. Background Technology

[0002] In the field of medical big data governance, medical professionals need to define a large number of data semantic rules based on clinical business needs, including derived attributes (such as the date of first visit), concept sets (such as the list of chemotherapy drugs), analysis cohorts (such as the cohort of patients after liver cancer surgery), and various quality indicators. These semantic rules form the basis for the construction of disease-specific databases, clinical research analysis, and hospital operational decisions.

[0003] Currently, the common way medical business experts define data semantic rules is by manually filling out variable definition documents in spreadsheet software (such as Microsoft Excel), describing the derived logic in semi-structured text (e.g., "meets any of the following conditions and maps to 'yes'", "maps to xxx earliest"). After reading the document, data development engineers manually translate each line of variable definition into SQL statements executable by the database, and then complete table creation, ETL task configuration, scheduling, and deployment one by one in the data platform. Due to the difference in professional division of labor between medical business experts and data development engineers, the above manual translation process is prone to misunderstandings and deviations in interpretation, resulting in the final implemented SQL logic being inconsistent with the original intent of the medical business experts. This deviation can only be eliminated through repeated communication and correction during the testing and integration phases.

[0004] To address the communication costs and quality issues associated with manual translation, some existing technologies offer declarative semantic layer DSLs for data analysis scenarios. These DSLs allow users to define data models, dimensions, measures, and their relationships using declarative syntax (such as YAML or SQL-like syntax), and the compilation engine translates these declarative definitions into underlying SQL for execution. However, these DSLs target data engineers and analysts, and their syntax is built around data modeling concepts such as "table joins" and "field mappings." Medical professionals need to translate clinical concepts into these syntactic elements before using them, and this translation process still carries the risk of misunderstanding.

[0005] Other technical solutions employ a visual drag-and-drop interface, encapsulating common data operations into visual components, allowing users to configure data filtering and calculation rules through these components. However, for complex logics common in the medical field, such as nested subqueries, time window constraints, event sequence judgments, multi-branch mappings, and concept set references, the visual interface often degenerates into deeply nested folded panels, resulting in numerous operation steps and limited practical usability.

[0006] With the development of large language model technology, some solutions attempt to replace structured input with natural language, directly converting natural language descriptions into SQL statements for execution using the large language model. However, the inherent ambiguity of natural language means that the same requirement may generate different SQL logic at different times and in different contexts, making it difficult to guarantee the stability of the interpretation. Furthermore, this solution cannot automatically extract and preserve reusable semantic assets.

[0007] This demonstrates that in existing technologies, the various stages of defining data semantic rules by medical professionals are fragmented. For example, semi-structured document preparation, DSL modeling, visualization configuration, and natural language description all result in definitions generated from different entry points that operate independently, lacking a unified, authoritative definition carrier and synchronization mechanism. Furthermore, reusable sets of named terms widely used in the medical field (such as disease diagnosis code sets and drug catalogs) are typically expanded inline within existing DSLs, meaning all members are listed completely at each reference point. This prevents them from being independently declared and uniformly referenced by name across multiple definitions, and from automatically taking effect as the set changes, leading to poor maintainability of semantic rules. In addition, the conversion from semantic definition to executable data queries still requires significant manual intervention; a complete processing solution is lacking that allows medical professionals to directly define data using their preferred expressions and automatically translate it into executable queries. Summary of the Invention

[0008] The purpose of this invention is to provide a method and system for processing clinical definition data with multiple views and synchronous source, aiming to solve the problems of entry point fragmentation, caliber drift and low efficiency of manual translation in the prior art.

[0009] In a first aspect, the present invention provides a method for processing clinical definition data with multiple views and synchronous processing, comprising: The target editing portal is used to obtain DSL clinical definition data submitted by medical business experts. The target editing portal includes a table editing portal, a DSL text editing portal, or an LLM natural language editing portal. The DSL clinical definition data from different target editing entry points are converted into a unified DSL clinical definition text; The unified DSL clinical definition text is written into the DSL text representation layer; the DSL text representation layer serves as the sole authoritative source, storing all DSL clinical definitions in plain text file format. All target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer. Any change to the DSL clinical definition under any target editing entry point is automatically synchronized to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. The types of clinical definitions in the DSL include object type definitions, derived attribute definitions, link relationship definitions, concept set definitions, queue definitions, indicator definitions, and action definitions. The concept set definition is a set of medical nomenclature terms that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is equipped with a global reference syntax for concept sets, which can be directly referenced by the object type definitions, derived attribute definitions, queue definitions, and indicator definitions through the global reference syntax for concept sets. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed. In response to a data access request submitted through any of the target editing entry points, the corresponding DSL clinical definition text is read from the DSL text representation layer, and the DSL clinical definition text is presented to the medical business expert terminal in the view form corresponding to the target editing entry point. Perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate an executable data query statement; The executable data query statement is sent to the target data engine for execution to obtain the corresponding query results, and the query results are output to the outside world through a preset service interface.

[0010] Secondly, the present invention provides a multi-view, synchronous clinical definition data processing system, comprising: The target editing entry is used to obtain DSL clinical definition data submitted by medical business experts. The target editing entry includes a table editing entry, a DSL text editing entry, or an LLM natural language editing entry. The synchronization and conversion layer is used to convert the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text and write it into the DSL text representation layer, and in response to a data access request submitted from any of the target editing entry points, to read the corresponding DSL clinical definition text from the DSL text representation layer and present it to the medical business expert terminal in the view form corresponding to the target editing entry point. The DSL text representation layer is used as the sole authoritative source to store all DSL clinical definitions in plain text file format. All the target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer. Any change to the DSL clinical definition under any target editing entry point is automatically synchronized to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. The types of clinical definitions in the DSL include object type definitions, derived attribute definitions, link relationship definitions, concept set definitions, queue definitions, indicator definitions, and action definitions. The concept set definition is a set of medical nomenclature terms that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is equipped with a global reference syntax for concept sets, which can be directly referenced by the object type definitions, derived attribute definitions, queue definitions, and indicator definitions through the global reference syntax for concept sets. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed. The compilation and execution layer is used to perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate executable data query statements; The service exposure layer is used to send the executable data query statement to the target data engine for execution, obtain the corresponding query results, and output the query results to the outside world through a preset service interface.

[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: By setting up three types of entry points—table editing, DSL text editing, and LLM natural language editing—the system acquires DSL clinical definition data submitted by medical business experts in their preferred manner. This makes medical business experts the primary source of definitions, solving the technical problem in existing technologies where medical business experts cannot directly participate in the semantic definition process and must rely on data engineers for translation. This eliminates the root cause of caliber drift caused by discrepancies in requirement communication and understanding. Furthermore, by converting definition data from different editing entry points into a unified DSL clinical definition text and writing it into the DSL text representation layer as the sole authoritative source, all downstream compilation and execution are derived from this authoritative definition. This cuts off the fundamental reason for inconsistencies caused by the parallel maintenance of multiple carriers such as requirement documents, Excel definitions, and SQL code in the traditional model. Simultaneously, all the target editing entry points are different view forms of the same authoritative definition. Changes in any form are automatically synchronized to the corresponding views in other forms. This solves the technical problem in existing technologies where editing entry points are fragmented, stored independently, and other entry points cannot automatically update after a change in one, leading to multiple version discrepancies. This completely eliminates the problem of update asynchrony caused by each entry point maintaining its own independent copy.

[0012] At the DSL syntax level, by setting medical nomenclature sets as independently declarable, nameable, and versionable concept set definitions, and providing a global reference syntax for direct cross-definition referencing of object type definitions, derived attribute definitions, queue definitions, and indicator definitions, changes to concept set members automatically take effect at all reference points. This solves the technical problems of existing technologies where medical nomenclature sets can only be embedded in various definitions through hard coding or inline expansion, cannot be uniformly referenced by multiple definitions, and cannot automatically propagate with changes to the set. It also avoids secondary caliber discrepancies introduced when all reference positions need to be searched and manually modified one by one due to terminology standard updates. Based on this, by performing DSL compilation and conversion on the DSL clinical definition text to automatically generate executable data query statements, which are then sent to the target data engine for execution and output through the service interface, a fully automated conversion from semantic definitions by medical business experts to executable query results is achieved. This solves the technical problems of existing technologies where semantic definitions must be manually translated into SQL code by data development engineers, which is inefficient and introduces a discrepancy opportunity with each translation. Medical business experts only need to complete the definition submission through their familiar entry point to directly obtain queryable and serviceable data capabilities. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a multi-view, same-source, synchronous clinical definition data processing method provided by the present invention.

[0014] Figure 2 This is a schematic diagram of the structure of a multi-view, same-source, synchronous clinical definition data processing system provided by the present invention.

[0015] Figure 3 This is a flowchart illustrating another method for processing clinical definition data with multiple views and synchronous origins provided by the present invention.

[0016] Figure 4 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation

[0017] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of this invention. The components of this invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0018] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and the multiple devices will interact with each other to complete the method described.

[0019] It should be noted that the above description describes some embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0020] Please see Figure 1 This invention provides a method for processing clinical definition data with multiple views and synchronous processing, comprising the following steps: S100. Obtain DSL clinical definition data submitted by medical business experts through the target editing entry, wherein the target editing entry includes a table editing entry, a DSL text editing entry, or an LLM natural language editing entry.

[0021] Please combine Figure 2 and Figure 3 Medical professionals can choose from three editing entry points—table editing, DSL text editing, or LLM natural language editing—based on their work habits and usage scenarios, and submit Domain Specific Language (DSL) defined data through the corresponding entry point. Furthermore, such as... Figure 2 As shown, the target editing entry can also include a visual UI entry as an auxiliary editing entry.

[0022] S200: Convert the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text.

[0023] In one embodiment, when the target editing entry is the table editing entry, the table editing entry corresponds to the variable definitions filled in by medical business experts according to a preset column structure. The step of obtaining the DSL clinical definition data submitted by the medical business experts through the target editing entry specifically includes: S101. Obtain a variable definition table filled out by medical business experts according to a preset table template, wherein there is a predefined mapping relationship between each column of the preset table template and the fields of the DSL clinical definition text; The mapping relationship includes at least: The first-level directory column of the preset table template is mapped to the category field of the DSL clinical definition text to identify the business category level to which the variable belongs; the transformation logic column is mapped to the formula field of the DSL clinical definition text to describe the derivation calculation logic of the variable; and the quality control column is mapped to the qualityRules field of the DSL clinical definition text to define the data quality verification rules of the variable. Step S200 converts the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text, specifically including: S201. The variable definition table is parsed using a table-to-DSL parser, and each row of data in the variable definition table is converted into a complete DSL clinical definition text according to the mapping relationship.

[0024] Specifically, the table editing entry retains the workflow of medical professionals filling in variable definitions column-by-column in Excel. When a medical professional selects the table editing entry, they fill in the variable definitions row by row in spreadsheet software (such as Microsoft Excel) according to a preset table template. After completing the form, the medical professional submits the variable definition table through the front-end page. The table-to-DSL parser receives the submitted variable definition table, traverses each row of the table according to the predefined column mapping relationship, automatically parses the conversion logic columns into an executable DSL formula, extracts the content of each column and fills it into the corresponding fields of the DSL clinical definition text, thereby converting each row into a complete DSL clinical definition text. After the table-to-DSL parser completes the conversion of all rows, it outputs all DSL clinical definition texts in summary. The parsing results are written to the DSL text presentation layer, and syntax or reference errors during the parsing process are returned to the Excel user through validation feedback logic, such as highlighting error rows.

[0025] In the process of converting tables to DSLs, the parsing of logical columns is a crucial step.

[0026] In one embodiment, the contents of the transformation logic column are parsed into an executable DSL formula, specifically including: The registered regular expression pattern library is invoked to perform pattern matching on the content of the transformed logical column, and the matching degree match(e) is calculated. i , R), where e i The table input is the i-th row, R is the regular expression pattern library, and the matching degree ranges from 0 to 1; When the matching degree is greater than or equal to the preset automatic parsing threshold, the content of the conversion logic column is automatically converted into a DSL formula; When the matching degree is less than the automatic parsing threshold, a manual correction prompt is generated and returned to the medical business expert terminal; The keywords and operators included in the regular expression pattern library preserve the existing expressions used by medical professionals in informal settings. The keywords include REGEXP, IN, AND, OR, IS NULL, and CASE WHEN.

[0027] Specifically, the table-to-DSL parser calls the registered regular expression pattern library to perform pattern matching on the content of the column. The regular expression pattern library includes keywords and operators spontaneously used by medical professionals in informal settings, including REGEXP (regular expression matching), IN (set membership check), AND (logical AND), OR (logical OR), IS NULL (null value check), and CASE WHEN (conditional branching). The table-to-DSL parser calculates the match degree between the content of the transformed logical column and the regular expression pattern library: match(e...). i When the matching degree is greater than or equal to the preset automatic parsing threshold, the table to DSL parser automatically converts the content of the conversion logic column into a formula expression that conforms to the DSL syntax specification; when the matching degree is less than the automatic parsing threshold, the parser generates a manual correction prompt and returns it to the medical business expert terminal through the front-end interface, indicating that there is content in the conversion logic of that row that cannot be automatically recognized, and the medical business expert needs to manually correct it and resubmit it.

[0028] For example, the value range of the automatic parsing threshold is 0.7 to 0.95, and it can be set to 0.85 for example.

[0029] In this invention, the keywords of the DSL syntax (including REGEXP, IN, AND, OR, IS NULL, CASE WHEN) retain the expressions that medical professionals have spontaneously used in informal environments such as Excel, ensuring that the primary user is the medical professional, rather than the data engineer. Medical professionals do not need to learn data engineering concepts such as table joins and field mappings; they can directly express derived logic using clinical thinking, such as "In all data prior to this visit, any of the following conditions are mapped to 'yes'." Compared to the data-modeling-centric syntax design of existing general declarative DSLs (such as dbt and LookML), this invention fundamentally eliminates the process of medical professionals translating clinical concepts into data modeling language, solving the problem of translation distortion caused by caliber drift.

[0030] In one embodiment, the DSL text editing portal is targeted at core medical professionals (such as approximately 5-10% of advanced users). When a medical professional selects the DSL text editing portal, they can directly write or modify DSL clinical definition text through the web-based DSL code editor. The DSL code editor provides auxiliary functions such as syntax highlighting, automatic completion of object attributes and concept sets, inline document display (displaying field definitions on mouse hover), real-time compilation verification, and a bloodline visualization sidebar. After completing the modifications in the editor, the medical professional submits the DSL clinical definition text by saving the changes.

[0031] In one embodiment, when the target editing entry is the LLM natural language editing entry, the LLM natural language editing entry corresponds to the natural language description requirement expression. The step of converting the DSL clinical definition data from different target editing entries into a unified DSL clinical definition text, and writing the unified DSL clinical definition text into the DSL text representation layer, specifically includes: The LLM to DSL converter inputs the natural language description submitted through the LLM natural language editing portal into the large language model, and the large language model outputs a DSL draft without directly generating SQL statements. The DSL draft is pushed to the medical business expert terminal, and a confirmation interface is displayed on the medical business expert terminal. In response to the confirmation operation of the medical business expert on the confirmation interface, the DSL draft is written to the DSL text presentation layer; In response to the modification operation performed by the medical business expert on the confirmation interface, the modified DSL clinical text is received and written into the DSL text presentation layer; For DSL drafts that have not been confirmed after the preset validity period, the LLM and DSL converter automatically cleans up the DSL drafts.

[0032] Specifically, the LLM natural language entry point is used by business experts to describe their requirements in natural language. When a medical business expert selects the LLM natural language editing entry point, they describe the data semantic definition requirements in natural language through the natural language input interface. For example, a medical business expert can input "If the current visit has a diagnosis code C78.0, it is considered liver metastasis." After receiving this natural language description, the LLM and DSL converter inputs it into the large language model, which outputs the corresponding DSL draft. The large language model does not directly generate SQL statements when outputting the DSL draft; it only generates definition text that conforms to the DSL syntax specification. The LLM and DSL converter pushes the DSL draft to the medical business expert's terminal and presents a confirmation interface on the terminal for the medical business expert to review. If the medical business expert clicks the confirmation operation on the confirmation interface, the DSL draft is adopted as valid DSL clinical definition data; if the medical business expert submits modifications on the confirmation interface, the modified DSL text is received as valid DSL clinical definition data. For DSL drafts that have not been confirmed after the preset validity period, the LLM and DSL converter automatically deletes the DSL draft. This embodiment helps medical professionals write DSL drafts more quickly, lowers the entry barrier for new users, and ensures the quality and consistency of the generated content.

[0033] For example, the preset validity period can range from 24 hours to 7 days, such as 72 hours.

[0034] S300. Write the unified DSL clinical definition text into the DSL text representation layer.

[0035] In this embodiment, DSL clinical definition data obtained from any target editing entry point is converted into a unified DSL clinical definition text format and written into the DSL text representation layer.

[0036] During implementation, when medical professionals submit variable definition tables through the table editing portal, the table-to-DSL parser converts the table data into DSL clinical definition text, and the system updates the corresponding plain text file in the DSL text representation layer with this DSL clinical definition text.

[0037] When a medical business expert submits DSL code through the DSL text editing portal, the system directly writes or overwrites the corresponding plain text file in the DSL text representation layer with the DSL clinical definition text in the editor.

[0038] Once a medical business expert confirms the LLM-generated DSL draft through the LLM natural language editing portal, the system will also write the confirmed DSL clinical definition text into the corresponding plain text file in the DSL text representation layer.

[0039] Therefore, regardless of which target editing entry point the medical business expert submits the definition from, they will all eventually converge to the same plain text file in the DSL text representation layer.

[0040] The DSL text representation layer serves as the sole authoritative source, storing all DSL clinical definitions in plain text files. All editing entry points (including table editing entry points, DSL text editing entry points, and LLM natural language editing entry points) are different view formats of the same authoritative definition within this DSL text representation layer. Changes to definitions under any target editing entry point are automatically synchronized to the corresponding views in other editing entry points, achieving bidirectional, same-source synchronization across multiple views.

[0041] In this embodiment of the invention, the fundamental role of the DSL text representation layer as the sole authoritative source is that when the system needs to perform DSL compilation and conversion to generate executable data query statements, the compiler's input source is uniquely determined to be the DSL clinical definition text in the DSL text representation layer, and there are no other copies maintained in parallel. In the traditional model, medical business experts maintain a variable definition in Excel, and data development engineers write SQL code based on this. This SQL code is stored in the scheduling configuration of the ETL platform. In addition, there may be descriptive definitions in the requirements document. These three contents are stored on different carriers, maintained by different personnel, and lack automatic synchronization, resulting in drift in definitions. Compared with the existing approach where different entry points are isolated from each other and each maintains an independent copy, this embodiment of the invention sets the DSL text representation layer as the sole authoritative source, so that downstream compilation and execution no longer depend on any other copy. All downstream products are derived from this sole authoritative source, thereby solving the problem of multi-version divergence and asynchronous updates at the system architecture level.

[0042] In this embodiment of the invention, the multi-view bidirectional same-source synchronization logic specifically includes: Three independent business editing entry points are set up: tables, plain text, and natural language. All editing operations are bound to a single, authoritative plain text DSL representation layer, ensuring no multiple independent copies of rules exist. The DSL text representation layer maintains the authoritative baseline of each DSL clinical definition using a versioned approach (e.g., Git commits). The current baseline version identifier for each DSL clinical definition is denoted as [insert identifier here]. And its current baseline field value is denoted as Γ. When any of the aforementioned target editing entries begins editing, the baseline version identifier on which it is based is read and recorded. The system adopts a bidirectional same-source synchronization logic, including a forward normalization process, a reverse synchronization step, and a concurrency conflict control process.

[0043] The forward normalization process converts the semantic configuration entered by the user at any editing entry point into standard DSL text and writes it to the authoritative source. The reverse synchronization step is that after any DSL clinical definition in the DSL text representation layer is changed, the update is automatically pushed to all editing entry points according to the mapping relationship, and the corresponding display content of each view is refreshed in real time. The concurrent conflict management process enables multiple editing entry points to edit the same semantic content simultaneously. By comparing fields with update timestamps through a consistency judgment function, it automatically distinguishes the modification priority and marks conflicts, achieving multi-role collaboration without data fragmentation.

[0044] Unlike existing solutions that rely on a single editing interface, separate storage of multiple files, and static interface copying, this invention ensures complete consistency of multi-view data from the underlying storage level, eliminating the need for manual synchronization and version inconsistencies.

[0045] For ease of understanding, Figure 2 The diagram illustrates the relationship between the DSL text presentation layer and each editing entry.

[0046] like Figure 2 As shown, the DSL text representation layer is located at the center of the system architecture. The table editing entry, DSL text editing entry, and LLM natural language editing entry are located above or around it, respectively. Each target editing entry interacts with the DSL text representation layer through the synchronization and conversion layer.

[0047] Specifically, the DSL text presentation layer is organized using a plain text file directory structure within the file system. This directory structure contains multiple plain text files categorized according to DSL clinical definition types: object type definition files, storing all object type declarations; derived attribute definition files, storing all derived attribute declarations; link relationship definition files, storing all relationship link declarations; concept set definition files, storing all concept set declarations; queue definition files, storing all queue declarations; indicator definition files, storing all indicator declarations; and action definition files, storing all action declarations.

[0048] The DSL clinical definition types include object type definitions (ObjectType), derived property definitions (DerivedProperty), link relationship definitions (Link), concept set definitions (ConceptSet), cohort definitions (Cohort), metric definitions (Metric), and action definitions (Action). Each type definition is stored in plain text format (such as JSON, YAML, or a custom text format) within the same text representation layer, and they are associated with each other through declaration names and reference identifiers. This association is uniformly parsed and verified during the compilation phase using a dependency graph. Each write operation to the DSL clinical definition text updates the corresponding plain text file by appending or overwriting, and synchronously records the change timestamp and change source (i.e., from which editing entry point), providing a time basis for subsequent synchronization determination and conflict detection.

[0049] Specifically, the concept set is defined as a medical terminology set that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is accompanied by a global reference syntax for the concept set, which can be directly referenced by the object type definition, the derived attribute definition, the queue definition, and the indicator definition through the global reference syntax for the concept set. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed.

[0050] The specific logic for the global linkage of the standardized medical terminology database is as follows: The concept set is set as an independent, versionable, first-class semantic component, and is equipped with a dedicated global reference syntax for ConceptSet. It can be called across entries by various DS definitions such as objects, derived attributes, queues, and indicators. During the compilation stage, a complete reference dependency graph is built based on the abstract syntax tree. When the medical terminology members within the concept set are adjusted, the system can automatically retrieve and mark all related derived attributes. After manual review, the full-link reference logic takes effect synchronously. At the same time, the semantic verification stage verifies the legality of terminology identifiers, monitors the dependency level threshold, and pushes error reminders in a differentiated manner according to different editing entry points. This makes up for the shortcomings of the existing medical DSL, which lacks a complete set of standardized terminology management and requires rewriting all association rules one by one when modifying terms.

[0051] Specifically, in the DSL text representation layer, concept set definitions exist as first-class citizens of the DSL syntax, existing as independent declarations and not belonging to any other definition type.

[0052] In one embodiment, a concept set definition includes a member list, source standards, responsible persons, and version history. The derived attributes reference the concept set definition using the concept set global reference syntax, which is formatted as ConceptSet(concept set identifier), where the concept set identifier is a pre-declared, independently global, and unique name of the concept set.

[0053] The member list includes all medical codes or terminology names contained in the terminology set. The source standard indicates the medical standards or knowledge sources on which the set is based, such as ICD-10, ICD-11, ATC drug classification system, etc. The person in charge is the medical business expert or team responsible for maintaining the terminology set. The version history includes the time, content, and reason for each change to the terminology set.

[0054] Each concept set is accompanied by a global concept set reference syntax, which has the format ConceptSet(concept set identifier), such as ConceptSet('name'). The global concept set reference syntax can be embedded in any legal location within object type definitions, derived attribute definitions, queue definitions, and indicator definitions, enabling direct cross-definition references.

[0055] For example, in a formula field defined as a derived attribute, a medical business expert could write the following expression: IF diag_code IN ConceptSet('ICD code for primary liver cancer') THEN 'liver cancer' ELSE 'non-liver cancer'; In the above expression, ConceptSet('Primary Liver Cancer ICD Code') refers to the complete list of members in the concept set definition named "Primary Liver Cancer ICD Code". After the compiler recognizes this reference syntax, it reads the member list with the corresponding name from the concept set definition file, expands it into the actual code set, and uses it for conditional evaluation.

[0056] When the member list within a concept set definition changes—for example, a medical professional adds a new code to the "Primary Liver Cancer ICD Codes" set according to the latest ICD-11 coding standard—there's no need to find and modify any reference locations individually because all definitions referencing the concept set use the ConceptSet reference syntax rather than hard-coded inline expansion. The compiler automatically reads the updated member list from the concept set definition file on the next compilation, and all derived attributes, queue conditions, and indicator definitions referencing the set are automatically compiled and executed using the new member list.

[0057] The aforementioned concept set independent declaration and cross-definition referencing scheme solves the problem of propagation when medical knowledge changes. In the traditional model, members of a term set are hard-coded and scattered across various SQL statements and ETL scripts. When log changes occur (such as ICD coding standard upgrades or drug catalog adjustments), data engineers need to find and modify all SQL code locations where the term set appears, a process that is not only inefficient but also prone to omissions or errors. This invention, through concept set independent declaration and global referencing syntax, makes the term set a semantic asset that can be uniformly maintained and whose changes are automatically propagated, avoiding secondary discrepancies introduced by manually finding and modifying all reference locations when terminology standards are updated.

[0058] In this embodiment of the invention, all the target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer, and their specific implementation is as follows: When a medical professional submits a data access request through the table editing portal, the synchronization and transformation layer reads the corresponding DSL clinical definition text from the DSL text representation layer and calls the table reverse renderer to render the DSL clinical definition text into an Excel-readable table file according to the column mapping relationship of the preset table template (first-level directory columns map to the category field, transformation logic columns map to the formula field, and quality control columns map to the qualityRules field). Each row of this table file corresponds to a derived attribute definition or object type definition in the DSL text representation layer, and the content of each column is extracted from the corresponding field in the DSL clinical definition text. After rendering is complete, the system pushes the table file to the medical professional's terminal for display.

[0059] When a medical professional submits a data access request through the DSL text editing portal, the synchronization and conversion layer directly reads the raw plain text content of the DSL clinical definition text from the DSL text presentation layer and presents it in the DSL code editor. This editor supports syntax highlighting, auto-completion, and real-time validation; however, what the medical professional sees and edits in the editor is always the same plain text content from the DSL text presentation layer.

[0060] When a medical professional submits a data access request through the LLM natural language editing portal, the synchronization and conversion layer reads the DSL clinical definition text from the DSL text representation layer, converts it into a natural language description (e.g., converting ConceptSet('List of Chemotherapy Drugs') into "a set of concepts referencing 'List of Chemotherapy Drugs'"), and presents it in the dialog interface. This natural language description does not change the content of the DSL clinical definition text; it is merely a visual representation of the same authoritative definition in natural language.

[0061] Therefore, regardless of which editing entry a medical professional views the DSL clinical definition content from, what they see is the same authoritative definition presented in the current form within the DSL text representation layer. The only difference between the different editing entry points is the format of the view; the information source is completely consistent.

[0062] In this embodiment of the invention, any change to the DSL clinical definition under any of the target editing entry points is automatically synchronized to the corresponding views of other target editing entry points. The specific implementation method is as follows: In one embodiment, the method further includes a reverse synchronization step: The system receives a change event of the DSL clinical definition text under any of the target editing entry points in the DSL text representation layer, and reverse synchronizes the rendering to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. Push the corresponding views of the other target editing entries to the medical business expert terminal.

[0063] Specifically, when the DSL clinical definition text under any target editing entry (such as the table editing entry, DSL text editing entry, or LLM natural language editing entry) changes, the system captures the change event in real time through a change monitoring mechanism. Change events include, but are not limited to: medical business experts adding or modifying variable definition rows in the table view, editing and saving the DSL clinical definition text in the text editor, and confirming or modifying the DSL draft generated by LLM in the natural language dialogue interface.

[0064] After receiving the change event, the system first writes the changed content to the corresponding plain text file in the DSL text presentation layer, updating the baseline state of the authoritative source. Once the writing is complete, the system triggers a reverse synchronization rendering process: based on a preset view mapping relationship, the changed DSL clinical definition text is converted into the format corresponding to the editing entry points of other targets.

[0065] Specifically, for the table editing entry point, the system reverse-renders the fields such as category, formula, and qualityRules in the DSL clinical definition text into a table-readable format file that conforms to the preset table template column structure; if the corresponding table view is currently open, the system re-renders the changed DSL clinical definition text into a table format and refreshes the table view in real time.

[0066] For the LLM natural language editing entry, the system converts the DSL clinical definition text into a natural language description; if the corresponding dialog interface is active, the system converts the changed DSL clinical definition text back into a natural language description and updates the dialog interface.

[0067] The DSL text editing entry point directly presents the original plain text content of the DSL clinical definition text.

[0068] After rendering is complete, the system pushes the updated content of each view to the medical expert's terminal in real time. This synchronization process can be completed within a time granularity of real-time to minutes. Medical experts can view the latest synchronized definition content in any currently open target editing entry without manually refreshing or reloading. If a view is not currently open, the system will automatically load the latest content the next time that view is accessed.

[0069] This invention, through a reverse synchronous rendering process, ensures that any DSL clinical definition change initiated in any target editing entry point can automatically propagate to the DSL text presentation layer and further spread to all other target editing entries. This guarantees that all views always present the latest definition content from the same authoritative source, avoiding data inconsistencies caused by independent maintenance between views. Medical professionals can complete definition changes in any view according to their own work habits, and the changes are immediately visible in all other views, achieving true multi-view bidirectional same-source synchronization.

[0070] In one embodiment, the DSL text representation layer maintains the authoritative baseline for each DSL clinical definition in a versioned manner, with the current baseline version identifier for each DSL clinical definition denoted as [insert identifier here]. And its current baseline field value is denoted as Γ. When any of the aforementioned target editing entries begins editing, the baseline version identifier on which it is based is read and recorded. When the target editing entry is submitted, the DSL field value of its edited content after view transformation is recorded as follows: ; When the same DSL clinical definition within the DSL text representation layer simultaneously receives concurrent modification requests from at least two types of target editing entry points, a preset consistency determination function is invoked to identify concurrent conflicts. The consistency determination function is: in, For a single DSL clinical definition entry, This is an indicator function that outputs 1 when the compound logic condition within the square brackets is true and 0 when it is false; Consistent(e i The value 1 indicates that the DSL baseline version has not been modified by any other target editing entry since the baseline was read from the target editing entry. When Consistent(e i ) = 1 and Val in ≠ Γ(edsl When a modification is deemed valid without concurrent conflicts, the DSL field value Val, obtained after view transformation of the current target editing entry, is used. in Override the baseline version of the DSL and simultaneously refresh the current baseline version identifier of the DSL clinical definition. and baseline update timestamp; When Consistent(e i ) = 1 and Val in = Γ(e dsl If the submission of the target editing entry does not result in any actual change, the current submission is accepted directly, and no write is performed on the DSL text presentation layer. When Consistent(e i When ) = 0, it is determined to be a concurrent conflict. The baseline version of DSL is retained, and the DSL field value of the edited content submitted at the target editing entry is pushed after view transformation. Compared with the current baseline field value Γ A comparison view of the differences is provided for manual review; After the content merging and review are completed manually, the merged standardized DSL clinical definitions will be uniformly written into the DSL text representation layer, and the current baseline version identifier of the DSL clinical definitions will be completed. And the synchronous refresh of the timestamp.

[0071] Specifically, for concurrent modifications of the same DSL clinical definition in different target editing entry points (including but not limited to table editing entry point, DSL text editing entry point, and LLM natural language editing entry point), the system performs a consistency judgment each time the edited content is submitted, in order to decide whether to automatically merge or transfer to manual review.

[0072] First, the edited content submitted through each target editing portal is standardized according to a unified format: The variable definition table submitted through the table editing portal is parsed using the preset field mapping relationship, and the translated field values ​​are denoted as μ(e). excel The LLM natural language editing entry's confirmed draft undergoes syntax normalization transformation, and the output standardized field values ​​are denoted as Λ(e). llm ); The DSL text editing entry directly reads the modified field values ​​Γ' The editable content of the three types of views is uniformly abstracted into a general variable. Adapt to the general input format of the consistency determination function.

[0073] Then, concurrent conflict identification is performed based on the consistency determination function. Consistent(e i= 1 indicates that the DSL baseline version has not been modified by other editing entries since the baseline was read from the target editing entry, that is, the commit is consistent with the current baseline and there are no concurrent conflicts.

[0074] The system handles the situation in three ways based on the judgment result: Scenario 1: Consistent with changes, choose automatic merging: When Consistent(e i ) = 1 and Valin ≠ Γ If a modification is deemed valid without concurrent conflicts, the current target editing entry point (Valin after view transformation) is used to overwrite the DSL baseline version, and the current baseline version identifier defined in the DSL clinical definition is refreshed simultaneously. The baseline update timestamp requires no additional conflict markers or manual intervention.

[0075] Scenario 2, consistent and unchanged, choose idempotent acceptance: when Consistent(e i ) = 1 and Valin = Γ If the submission does not result in any actual change, it is accepted directly without performing a write operation on the DSL text presentation layer.

[0076] Scenario 3: Concurrent conflict detected, manual review selected: When Consistent(e i When ) = 0, it indicates that the baseline on which the target editing entry is based has been updated by other editing entries during its editing process, which is determined to be a concurrent conflict. The DSL baseline version is preserved and not overwritten. A conflict flag can be added and the update pushed. Compared with the current baseline value Γ A comparison view of the differences is provided for manual review; After business experts complete the selection, merging, editing, and submission of multiple revisions on the unified difference review interface, the system writes the merged standardized DSL clinical definitions into the DSL text representation layer and identifies the current baseline version of the DSL clinical definitions. It also synchronizes the update of timestamps. In addition, it can trigger a global reverse synchronization process to automatically render the updated baseline content to all target editing entry views, completing a full-domain refresh.

[0077] Because the aforementioned consistency determination process identifies the baseline version on which the submission is based with each target edit entry submission. Identification with the latest baseline version By comparing sequentially, concurrent modifications to any two or more target editing entry points are reduced to successive version checks against the same authoritative baseline. Therefore, this determination method is applicable to all combinations of concurrent modifications between different target editing entry points, such as table editing entry points, DSL text editing entry points, and LLM natural language editing entry points, as well as simultaneous concurrent modifications between the three. Furthermore, it will not cause modification loss due to later submissions overwriting earlier submissions.

[0078] In one embodiment, the DSL text representation layer has built-in Git version control capabilities, supporting difference comparison, merge requests, and rollback operations for DSL clinical definition texts.

[0079] The DSL text representation layer is equipped with a Git-like version control engine. Every definition change submitted through any target editing entry generates an independent version commit record. The dimensions of the version commit record include the change source entry, change timestamp, field-level difference snapshot, and operation subject identifier. The DSL text representation layer supports full version difference comparison, rollback of specified historical versions, and merging of multiple change branches. For concept set definitions, a separate term iteration ledger is maintained to adapt to the compliance traceability audit requirements of medical data.

[0080] The conflict detection logic described above works in conjunction with the Git version control logic built into the DSL text representation layer. When concurrent conflicts are detected, the system preserves the DSL baseline version from being overwritten and pushes a difference comparison view for manual review; the entire process of conflict detection, review, and resolution is recorded in the Git commit history. Through the conflict detection logic driven by the consistency decision function, the integrity and consistency of the DSL text representation layer as the sole authoritative source are not compromised in concurrent modification scenarios. This avoids the loss of changes caused by later commits overwriting earlier commits, while ensuring that modifications at each target editing entry point can be correctly reduced and traced in concurrent scenarios with multiple target editing entry points.

[0081] S400: In response to a data access request submitted through any of the target editing entry points, read the corresponding DSL clinical definition text from the DSL text representation layer, and present the DSL clinical definition text to the medical business expert terminal in the view format corresponding to the target editing entry point.

[0082] In this embodiment, after completing the DSL clinical definition, the medical business expert may need to view or verify the defined content. When the medical business expert submits a data access request through any target editing entry, the system reads the corresponding DSL clinical definition text from the DSL text presentation layer, and renders the DSL clinical definition text into the view form corresponding to the target editing entry according to the target editing entry that initiated the request, and then presents it to the medical business expert's terminal.

[0083] S500: Perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate an executable data query statement.

[0084] The compilation process includes five sub-steps: lexical and syntactic analysis, semantic verification, dependency graph construction, query plan generation, and SQL dialect translation.

[0085] In one embodiment, step S500 specifically includes: Lexical and syntactic analysis are performed on the clinical definition text of the DSL to generate an abstract syntax tree; Semantic validation is performed on the abstract syntax tree, including field existence validation, concept set reference validity validation, type matching validation, and circular dependency detection; the concept set reference validity validation includes performing existence validation on the global reference syntax of the concept set to confirm whether the referenced concept set definition has been defined in the DSL text representation layer; A full dependency graph is constructed based on the abstract syntax tree that has passed semantic validation. The nodes of the dependency graph are clinical definitions of the DSL, and the edges are reference relationships between declarations. The dependency graph automatically tracks the derived attribute definitions that reference the concept set definitions. Generate a query plan based on the dependency graph; The type of the target data engine is identified based on the query plan, including Hive, Doris, StarRocks, or PostgreSQL; Based on the type of the target data engine, the corresponding SQL dialect generator is invoked to translate the query plan into an executable data query statement that conforms to the syntax specification of the target data engine.

[0086] In this embodiment, as Figure 3 As shown, firstly, lexical and syntactic analysis is performed on the DSL clinical definition text. The compiler scans the input DSL clinical definition text character by character and performs semantic recognition, splitting it into independent lexical units and labeling the type of each lexical unit (such as keyword, identifier, operator, constant, etc.). Subsequently, the scheduling field algorithm is used to prioritize the lexical unit sequence, eliminating ambiguity between parentheses and priorities, and outputting a sequence of postfix expressions in Reverse Polish Notation. Finally, a binary abstract syntax tree (AST) is constructed by traversing the postfix expression sequence from bottom to top based on a stack structure. The leaf nodes of the AST correspond to atomic or aggregate indices, and the internal nodes correspond to arithmetic operators (addition, subtraction, multiplication, division) or aggregate operators (SUM, AVG, COUNT, etc.).

[0087] Secondly, semantic validation is performed on the abstract syntax tree (DSL). Semantic validation includes the following four aspects: field existence validation, used to check whether each field referenced in the DSL exists in its corresponding data source; concept set reference validity validation, used to perform existence validation on ConceptSet (concept set identifier) ​​references appearing in the DSL, confirming whether the referenced concept set identifier has been independently declared in the DSL text representation layer; type matching validation, used to check whether the operand types of each operator match the expected types of the operators; and circular dependency detection, used to check whether there are circular dependencies in the reference relationships between the various DSL clinical definitions.

[0088] In one embodiment, such as Figure 3 As shown, when semantic validation fails, an error message is generated and fed back to the entry point that initiated the editing operation.

[0089] If the entry point is a table editing entry point, the error message will be displayed in the table as a highlighted error row; if the entry point is a DSL text editing entry point, the error message will be displayed in the text editor as code annotations; if the entry point is an LLM natural language editing entry point, the error message will be displayed in the dialog interface as text, prompting the medical business expert to correct and resubmit.

[0090] Specifically, the system uses different error message presentation methods for different editing entry points.

[0091] If the semantic validation trigger point is the table editing entry point, error messages are displayed as highlighted error rows in the original table. The table-to-DSL parser records the mapping relationship between each row of table data and the DSL clinical definition text during the parsing process. When the semantic validator detects problems such as missing field references, undefined concept sets, or type mismatches in a DSL clinical definition, the validator returns the error type and location to the parser. The parser then locates the error in the corresponding row and column of the original table based on the row mapping relationship, highlights the row, and displays an error description next to the error cell. Medical professionals can then directly locate and correct the error in the table view.

[0092] If the semantic validation trigger point is the DSL text editor entry point, the error information is presented in the text editor as code annotations. When the semantic validator detects an error, it records the error type, error location (line and column numbers), and error description. The front-end editor displays a red wavy underline or an inline error marker at the corresponding error line and summarizes all error entries in the error panel in the editor's sidebar. When a medical professional clicks on an error entry, the editor automatically jumps to the location of the error code for correction.

[0093] If the semantic validation trigger is the LLM natural language editing entry point, the error message is presented in text form on the dialog interface. The LLM to DSL converter combines the structured error message into a natural language readable error message, such as "The derived attribute of your defined 'liver metastasis identifier' references an undefined concept set 'primary liver cancer ICD code'. Please complete the declaration in the concept set definition first." The system pushes this prompt to the dialog interface, and the medical business expert re-enters the corrected natural language description based on the error message.

[0094] Error messages from all three entry points originate from the same semantic validator, ensuring consistency in error judgment logic. Furthermore, different presentation formats are adapted to the operational characteristics of each entry point. Regardless of which entry point a medical professional submits a definition from, they can receive error feedback within a familiar interface in a manner most consistent with the interaction characteristics of that entry point, reducing the cognitive cost of error correction.

[0095] Next, as Figure 3 As shown, when semantic validation passes, a full dependency graph is constructed based on the abstract syntax tree that passed semantic validation. The dependency graph is a directed acyclic graph, where nodes are the clinical definitions of each DSL, and edges represent the reference relationships between declarations. The dependency graph automatically tracks derived attribute definitions that reference concept set definitions, that is, it records which derived attribute definitions reference which concept set definitions through the global reference syntax of concept sets.

[0096] In one embodiment, when the member list defined by the concept set changes, all affected derived attributes are marked through the dependency graph, and all reference points automatically take effect after review and confirmation; when the depth of the dependency graph exceeds a preset maximum depth threshold, a design warning is triggered, prompting medical business experts to check for excessively deep dependency chains.

[0097] For example, the preset maximum depth threshold ranges from 5 to 15, and can be set to 10 layers.

[0098] Next, a query plan is generated based on the dependency graph. The query plan generator determines the computation order and dependencies of each DSL clinical definition according to the topological order of the dependency graph, and generates an optimized execution plan.

[0099] Finally, the target data engine type is identified based on the query plan. Target data engine types include Hive, Doris, StarRocks, or PostgreSQL. Based on the identified target data engine type, the corresponding SQL dialect generator is invoked to translate the query plan into executable data query statements conforming to the syntax of that target data engine. SQL dialect generators for different target data engine types use the same query plan as input but generate different SQL dialects based on the syntactic characteristics of their respective engines. When the underlying data engine changes (e.g., migrating from Hive to Doris), only the SQL dialect generator needs to be switched; the DSL clinical definition text itself does not need to be modified.

[0100] Furthermore, such as Figure 3 As shown, in one embodiment, the present invention also provides a materialization strategy selection function.

[0101] Specifically, after generating a query plan based on the dependency graph and before identifying the type of the target data engine, the method further includes a materialization strategy selection step: Obtain the query frequency index, computational complexity index, and data change frequency index of the DSL clinical definition; When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is less than or equal to the third threshold, the materialization mode of full materialization into a table and periodic refresh is selected. When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is greater than the third threshold, select incremental materialization and materialization mode triggered by change data capture. When the query frequency index is less than the first threshold and the computational complexity index is greater than or equal to the second threshold, the materialization mode with the least recently used cache is selected. When the query frequency index is greater than or equal to the first threshold and the computational complexity index is less than the second threshold, the materialization mode of real-time computation virtual view is selected. When the query frequency index is less than or equal to the fourth threshold, the materialization mode of non-materialization on-demand calculation is selected, where the fourth threshold is less than the first threshold.

[0102] In this embodiment, the system acquires the query frequency index, computational complexity index, and data change frequency index for each DSL clinical definition. The query frequency index records the number of times the DSL clinical definition is called within a preset time window; the computational complexity index is generated by the compiler and execution layer based on the number of nodes, depth, and number of join operations involved in the abstract syntax tree; the data change frequency index is obtained by monitoring the change logs of the corresponding data tables in the target data engine.

[0103] Based on the combination of values ​​for the above three indicators, the optimal materialization mode is automatically selected according to the following rules.

[0104] When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is less than or equal to the third threshold, it indicates that the clinical definition of the DSL is queried frequently, has a large computational cost, and the underlying data changes slowly. Therefore, the materialization mode of fully materializing into a physical table and refreshing it periodically is selected. During the query, the materialized table is read directly to avoid repeated calculations.

[0105] When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is greater than the third threshold, it indicates that the clinical definition of the DSL is frequently queried, has a large computational cost, and the underlying data changes frequently. Full-time refresh cannot reflect data changes in a timely manner. Incremental materialization is selected and combined with the materialization mode triggered by change data capture. Incremental calculation is only performed on the data partitions that have changed, so as to achieve near real-time update of materialization results.

[0106] When the query frequency index is less than the first threshold and the computational complexity index is greater than or equal to the second threshold, it indicates that the query frequency of the clinical definition of the DSL is not high but the computational cost is large. The materialization mode of least recently used cache is selected. The calculation is performed and the result is cached when the first query is performed. Subsequent queries that hit the cache are returned directly.

[0107] When the query frequency index is greater than or equal to the first threshold and the computational complexity index is less than the second threshold, it indicates that the clinical definition of the DSL is queried frequently but the computational overhead is small. In this case, the materialization mode of real-time calculation of the virtual view is selected, the physical results are not stored, and the results are returned after real-time calculation for each query.

[0108] When the query frequency index is less than or equal to the fourth threshold (the fourth threshold is less than the first threshold), it means that the clinical definition of the DSL is rarely queried. The materialization mode of non-materialization and on-demand calculation is selected, and the calculation is only performed when querying. The results are not cached or stored.

[0109] The first, second, third, and fourth thresholds mentioned above are all configurable parameters preset by the system. The first threshold is used to distinguish whether the DSL clinical definition is queried frequently, with a value ranging from 10 to 100 times / day; the second threshold is a normalization threshold, with a value ranging from 0.3 to 0.7, where the compilation and execution layer normalizes the computational complexity of each DSL clinical definition to a value between 0 and 1; the third threshold is used to distinguish the frequency of changes in the underlying data, with a value ranging from 5% to 20% based on the average daily change rate; the fourth threshold is used to distinguish whether it is completely unmaterialized, with a value ranging from 1 to 5 times / day, and is usually set to 10% to 20% of the first threshold.

[0110] For example, in a deployment targeting hospital operations analytics, the first threshold can be set to 50 times / day, the normalized complexity threshold corresponding to the second threshold can be set to 0.5, the third threshold can be set to an average daily change rate of 10%, and the fourth threshold can be set to 5 times / day. After system deployment, medical business experts or system administrators can adjust each threshold through the configuration interface to adapt to performance requirements under different data scales and query loads.

[0111] For boundary cases that do not fall into any of the above judgment combinations, the system adopts the default real-time calculation virtual view mode as a fallback strategy.

[0112] The above determination results drive the SQL generation mode selection of the compilation layer. SQL statements generated in full or incremental materialization mode include table creation and data writing statements; real-time computation or non-materialization mode only generates query statements. Simultaneously, materialized queries are preferentially read from the materialized table as API responses, while non-materialized queries fall back to the real-time computation path.

[0113] Through the automatic selection of the aforementioned materialization strategy, the system dynamically decides the materialization method based on the actual query characteristics and data features of each DSL clinical definition. This eliminates the need for manual configuration by medical professionals, ensuring response performance in high-frequency query scenarios and avoiding unnecessary computational and storage overhead in low-frequency query scenarios. When the underlying data engine changes, the materialization strategy engine's decision logic remains unchanged; only the SQL dialect of the materialization statement switches according to the target engine type. The DSL clinical definition text does not require modification.

[0114] Through the above-described step S500 embodiment, medical business experts only need to describe "what the derived attributes are," and the compiler automatically generates a query plan, selects the optimal materialization strategy, identifies the target data engine type, and calls the corresponding SQL dialect generator to translate the query plan into executable SQL statements that conform to the engine's syntax specifications. Changes to the underlying data engine have zero impact on the clinical definition text of the medical business expert's DSL. Compared with the existing approach of binding the DSL to a single execution engine, this embodiment of the invention achieves decoupling between the semantic definition layer and the data execution layer.

[0115] S600: The executable data query statement is sent to the target data engine for execution to obtain the corresponding query result, and the query result is output to the outside through a preset service interface.

[0116] The compiler sends the executable data query statement generated in step S500 to the target data engine for execution. After executing the query statement, the target data engine returns the corresponding query results.

[0117] In one embodiment, the system outputs query results through a preset service interface, which includes at least one of a RESTAPI endpoint, a GraphQL endpoint, or a SQL endpoint. Downstream application systems (such as scientific research data analysis platforms and quality control dashboard systems) obtain query results by calling the aforementioned service interface, enabling query access to data semantics such as derived attribute values, queue members, and indicator values ​​defined by medical business experts.

[0118] In summary, compared with the prior art, the beneficial effects of the present invention are as follows: By setting up three types of entry points—table editing, DSL text editing, and LLM natural language editing—the system acquires DSL clinical definition data submitted by medical business experts in their preferred manner. This makes medical business experts the primary source of definitions, solving the technical problem in existing technologies where medical business experts cannot directly participate in the semantic definition process and must rely on data engineers for translation. This eliminates the root cause of caliber drift caused by discrepancies in requirement communication and understanding. Furthermore, by converting definition data from different editing entry points into a unified DSL clinical definition text and writing it into the DSL text representation layer as the sole authoritative source, all downstream compilation and execution are derived from this authoritative definition. This cuts off the fundamental reason for inconsistencies caused by the parallel maintenance of multiple carriers such as requirement documents, Excel definitions, and SQL code in the traditional model. Simultaneously, all the target editing entry points are different view forms of the same authoritative definition. Changes in any form are automatically synchronized to the corresponding views in other forms. This solves the technical problem in existing technologies where editing entry points are fragmented, stored independently, and other entry points cannot automatically update after a change in one, leading to multiple version discrepancies. This completely eliminates the problem of update asynchrony caused by each entry point maintaining its own independent copy.

[0119] At the DSL syntax level, by setting medical nomenclature sets as independently declarable, nameable, and versionable concept set definitions, and providing a global reference syntax for direct cross-definition referencing of object type definitions, derived attribute definitions, queue definitions, and indicator definitions, changes to concept set members automatically take effect at all reference points. This solves the technical problems of existing technologies where medical nomenclature sets can only be embedded in various definitions through hard coding or inline expansion, cannot be uniformly referenced by multiple definitions, and cannot automatically propagate with changes to the set. It also avoids secondary caliber discrepancies introduced when all reference positions need to be searched and manually modified one by one due to terminology standard updates. Based on this, by performing DSL compilation and conversion on the DSL clinical definition text to automatically generate executable data query statements, which are then sent to the target data engine for execution and output through the service interface, a fully automated conversion from semantic definitions by medical business experts to executable query results is achieved. This solves the technical problems of existing technologies where semantic definitions must be manually translated into SQL code by data development engineers, which is inefficient and introduces a discrepancy opportunity with each translation. Medical business experts only need to complete the definition submission through their familiar entry point to directly obtain queryable and serviceable data capabilities.

[0120] The five steps described above form a closed loop: medical experts directly express definitions, the system uniformly converts these definitions into a single authoritative definition and synchronizes them to all views, then the compiler layer automatically derives executable queries, and terminology changes at the knowledge level are automatically propagated through a multi-view bidirectional same-source synchronization mechanism. Each step eliminates the potential for errors introduced by manual intervention in traditional models, thereby fundamentally solving a series of technical problems in existing technologies, such as fragmented entry points, drifting definitions, low efficiency of manual translation, and the inability to reuse and automatically propagate concept sets.

[0121] Please see Figure 2 Based on the same inventive concept, and corresponding to the methods of any of the above embodiments, this invention also discloses a multi-view synchronous clinical definition data processing system, comprising: The target editing entry is used to obtain DSL clinical definition data submitted by medical business experts. The target editing entry includes a table editing entry, a DSL text editing entry, or an LLM natural language editing entry. The synchronization and conversion layer is used to convert the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text and write it into the DSL text representation layer, and in response to a data access request submitted from any of the target editing entry points, to read the corresponding DSL clinical definition text from the DSL text representation layer and present it to the medical business expert terminal in the view form corresponding to the target editing entry point. The DSL text representation layer is used as the sole authoritative source to store all DSL clinical definitions in plain text file format. All the target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer. Any change to the DSL clinical definition under any target editing entry point is automatically synchronized to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. The types of clinical definitions in the DSL include object type definitions, derived attribute definitions, link relationship definitions, concept set definitions, queue definitions, indicator definitions, and action definitions. The concept set definition is a set of medical nomenclature terms that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is equipped with a global reference syntax for concept sets, which can be directly referenced by the object type definitions, derived attribute definitions, queue definitions, and indicator definitions through the global reference syntax for concept sets. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed. The compilation and execution layer is used to perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate executable data query statements; The service exposure layer is used to send the executable data query statement to the target data engine for execution, obtain the corresponding query results, and output the query results to the outside world through a preset service interface.

[0122] The system described in the above embodiments is used to implement a corresponding multi-view synchronous clinical definition data processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0123] In one embodiment, the synchronization and conversion layer further includes a conflict detection unit, and the DSL text representation layer maintains the authoritative baseline of each DSL clinical definition in a versioned manner, with the current baseline version identifier of each DSL clinical definition denoted as […]. And its current baseline field value is denoted as Γ. When any of the aforementioned target editing entries begins editing, the baseline version identifier on which it is based is read and recorded. When the target editing entry is submitted, the DSL field value of its edited content after view transformation is recorded as follows: ; This function is used to identify concurrent conflicts when the same DSL clinical definition within the DSL text representation layer simultaneously receives concurrent modification requests from at least two types of target editing entry points; The consistency determination function is: in, For a single DSL clinical definition entry, This is an indicator function that outputs 1 when the compound logic condition within the square brackets is true and 0 when it is false; Consistent(e i The value 1 indicates that the DSL baseline version has not been modified by any other target editing entry since the baseline was read from the target editing entry. When Consistent(e i ) = 1 and Val in ≠ Γ(e dsl When a modification is deemed valid without concurrent conflicts, the DSL field value Val, obtained after view transformation of the current target editing entry, is used. in Override the baseline version of the DSL and simultaneously refresh the current baseline version identifier of the DSL clinical definition. and baseline update timestamp; When Consistent(e i ) = 1 and Val in = Γ(e dsl If the submission of the target editing entry does not result in any actual change, the current submission is accepted directly, and no write is performed on the DSL text presentation layer. When Consistent(e i When ) = 0, it is determined to be a concurrent conflict. The baseline version of DSL is retained, and the DSL field value of the edited content submitted at the target editing entry is pushed after view transformation. Compared with the current baseline field value Γ A comparison view of the differences is provided for manual review; After the content merging and review are completed manually, the merged standardized DSL clinical definitions will be uniformly written into the DSL text representation layer, and the current baseline version identifier of the DSL clinical definitions will be completed. And the synchronous refresh of the timestamp.

[0124] In one embodiment, the system provided in this embodiment further includes a materialization strategy engine module, used to automatically select a materialization mode based on the query frequency, computational complexity, and data change frequency defined by the DSL clinical definition. Materialization modes include full materialization into a table with periodic refresh, incremental materialization combined with change data capture triggering, least recently used cache, real-time calculation of virtual views, and no materialization with on-demand calculation. The specific applicable conditions for each materialization mode are consistent with those described in the method embodiment and will not be repeated here.

[0125] The following section uses the construction of a disease-specific research database by a medical institution as an application scenario to further illustrate the method and system provided by this invention.

[0126] In this scenario, medical professionals need to define approximately 200 derived attributes, including the date of initial consultation, CNLC stage, liver metastasis markers, and chemotherapy regimens.

[0127] Before adopting this invention, medical professionals manually wrote the conversion logic columns in Excel, describing the derived logic in a semi-structured form. Data development engineers then manually translated the Excel files into SQL. Each derived attribute took approximately 5 working days, totaling about 3 person-years for 200 attributes. Furthermore, translation errors required repeated corrections during the testing phase.

[0128] After adopting the solution of this invention, the medical institution completes the definition and online implementation of derived attributes according to the following process.

[0129] Medical professionals continue to use standardized Excel templates to fill in variable definitions. Key columns in the template include: a first-level category column (identifying the business category level to which the variable belongs), a variable name column, a data source column, a transformation logic column (describing the derivation logic in semi-structured text, such as "FIRST(patient.hasDiagnosis WHERE diag_code_std REGEXP'C22.0' ORDER BY belongsToVisit.dis_ime ASC).belongsToVisit.dis_ime"), a results table column, and a quality control rule column.

[0130] After completing approximately 200 lines of definitions, medical professionals submit an Excel template. The spreadsheet-to-DSL parser automatically parses the transformation logic columns of each row: it calls the regular expression pattern library to identify keywords such as REGEXP, IN, FIRST, and ORDER BY, verifies the existence of referenced object attributes, and checks whether concept set references have been independently declared in the DSL text representation layer. After successful parsing, each row is converted into complete DSL clinical definition text according to predefined column mapping relationships and written to the DSL text representation layer. Taking the first visit date as an example, the expression in the transformation logic column is parsed into a DSL formula, indicating that records with diagnostic codes matching C22.0 (primary liver cancer) are selected from all patient medical records, sorted in ascending order by visit time, and the visit date of the first record is taken as the first visit date.

[0131] The compilation pipeline performs DSL compilation and transformation on the DSL clinical definition text in the DSL text representation layer. When the transformation logic of a certain row references the concept set "Primary Liver Cancer ICD Code" but this set has not yet been declared, the semantic validator intercepts the error during the concept set reference validity verification stage, generates an error message, and feeds it back to the table editing entry point. The error is highlighted in the original Excel table, allowing medical professionals to directly locate and correct it in the table view. After the verification passes, the compiler constructs a full dependency graph based on the abstract syntax tree, recording the reference relationships between each derived attribute and the concept set.

[0132] The validated DSLs are translated into executable SQL statements for the underlying data warehouse (such as Doris) by the SQL dialect generator. The materialization strategy engine obtains query frequency, computational complexity, and data change frequency metrics for each DSL's clinical definitions. In this scenario, the first-visit date derived attribute is queried daily by the quality control dashboard (high frequency), involving calculations on approximately 20,000 patient records (recalculation), while the underlying data is archived static data (low-frequency change). The materialization strategy engine selects a materialization mode that fully materializes the data into tables and refreshes them periodically. The SQL generated by the compilation layer includes table creation and data writing statements, and the materialization results are refreshed daily at midnight.

[0133] The service exposure layer automatically generates REST API endpoints (such as GET / objects / Patient / {id} / firDiagDate) and a Python SDK, allowing downstream research teams to directly access derived attribute values ​​via the API. When core medical business experts add codes to the "Primary Liver Cancer ICD Codes" concept set according to the ICD-11 standard, the dependency graph automatically labels approximately 15 affected derived attributes (including first visit date, first visit age, etc.), and all references automatically take effect after review and confirmation.

[0134] In this scenario, the definition cycle for 200 derived attributes was reduced from approximately 3 person-years to approximately 3 person-months. Medical business experts directly wrote the definitions, and data engineers shifted from manually writing SQL for each attribute to maintaining the platform and resolving complex issues. The discrepancy rate of quality control indicators caused by caliber drift decreased from approximately 15% to below 1%. New analytical requirements no longer require creating new physical tables; they can be achieved by defining new combinations of queue and indicator definitions.

[0135] In the example above, the automatic resolution threshold is set to 0.85, the maximum depth threshold of the dependency graph is set to 10 layers, and the validity period of the LLM draft is set to 72 hours.

[0136] like Figure 4As shown, based on the same inventive concept, corresponding to any of the above embodiments, this invention also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements a multi-view, same-source, synchronous clinical definition data processing method of the above embodiments.

[0137] Specifically, the device includes: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected within the device via the bus 1050.

[0138] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0139] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0140] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device or connected externally to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0141] The communication interface 1040 is used to connect the communication module to enable communication and interaction between this device and other devices. The communication module can communicate via wired means (such as USB (Universal Serial Bus), network cable, etc.) or wireless means (such as mobile network, WIFI (Wireless Fidelity), Bluetooth, etc.).

[0142] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0143] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0144] The electronic device described above is used to implement a corresponding multi-view synchronous clinical definition data processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0145] Based on the same inventive concept, corresponding to any of the above embodiments, this invention also discloses a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to execute a multi-view, same-source, synchronous clinical definition data processing method as described in the above embodiments.

[0146] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0147] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute a multi-view synchronous clinical definition data processing method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0148] The above description is merely a preferred embodiment of the present invention and the technical principles employed. The present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the claims.

Claims

1. A method for processing clinical definition data with multiple views and synchronous processing, characterized in that, include: The target editing portal is used to obtain DSL clinical definition data submitted by medical business experts. The target editing portal includes a table editing portal, a DSL text editing portal, or an LLM natural language editing portal. The DSL clinical definition data from different target editing entry points are converted into a unified DSL clinical definition text; The unified DSL clinical definition text is written into the DSL text representation layer; the DSL text representation layer serves as the sole authoritative source, storing all DSL clinical definitions in plain text file format. All target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer. Any change to the DSL clinical definition under any target editing entry point is automatically synchronized to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. The types of clinical definitions in the DSL include object type definitions, derived attribute definitions, link relationship definitions, concept set definitions, queue definitions, indicator definitions, and action definitions. The concept set definition is a set of medical nomenclature terms that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is equipped with a global reference syntax for concept sets, which can be directly referenced by the object type definitions, derived attribute definitions, queue definitions, and indicator definitions through the global reference syntax for concept sets. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed. In response to a data access request submitted through any of the target editing entry points, the corresponding DSL clinical definition text is read from the DSL text representation layer, and the DSL clinical definition text is presented to the medical business expert terminal in the view form corresponding to the target editing entry point. Perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate an executable data query statement; The executable data query statement is sent to the target data engine for execution to obtain the corresponding query results, and the query results are output to the outside world through a preset service interface.

2. The method according to claim 1, characterized in that, When the target editing entry is the table editing entry, the step of obtaining the DSL clinical definition data submitted by medical business experts through the target editing entry specifically includes: Obtain a variable definition table filled out by medical business experts according to a preset table template. There is a predefined mapping relationship between each column of the preset table template and the fields of the DSL clinical definition text. The mapping relationship includes at least the following: the first-level directory column of the preset table template is mapped to the category field of the DSL clinical definition text, the transformation logic column is mapped to the formula field of the DSL clinical definition text, and the quality control column is mapped to the qualityRules field of the DSL clinical definition text. The process of converting the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text specifically includes: The variable definition table is parsed using a table-to-DSL parser, and each row of data in the variable definition table is converted into a complete DSL clinical definition text according to the mapping relationship.

3. The method according to claim 2, characterized in that, The contents of the conversion logic column are parsed into executable DSL formulas, specifically including: The registered regular expression pattern library is invoked to perform pattern matching on the content of the transformed logical column, and the matching degree match(e) is calculated. i , R), where e i The table input is the i-th row, R is the regular expression pattern library, and the matching degree ranges from 0 to 1; When the matching degree is greater than or equal to the preset automatic parsing threshold, the content of the conversion logic column is automatically converted into a DSL formula; When the matching degree is less than the automatic parsing threshold, a manual correction prompt is generated and returned to the medical business expert terminal; The keywords and operators contained in the regular expression pattern library preserve the existing expressions used by medical professionals in informal settings.

4. The method according to claim 1, characterized in that, The method also includes a reverse synchronization step: The system receives a change event of the DSL clinical definition text under any of the target editing entry points in the DSL text representation layer, and reverse synchronizes the rendering to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. Push the corresponding views of the other target editing entries to the medical business expert terminal.

5. The method according to claim 4, characterized in that, The DSL text representation layer incorporates Git version control, difference comparison, merge requests, and rollback capabilities. The DSL text representation layer maintains the authoritative baseline for each DSL clinical definition in a versioned manner, with the current baseline version identifier for each DSL clinical definition denoted as [insert identifier here]. And its current baseline field value is denoted as Γ. When any of the aforementioned target editing entries begins editing, the baseline version identifier on which it is based is read and recorded. When the target editing entry is submitted, the DSL field value of its edited content after view transformation is recorded as follows: ; When the same DSL clinical definition within the DSL text representation layer simultaneously receives concurrent modification requests from at least two types of target editing entry points, a preset consistency determination function is invoked to identify concurrent conflicts. The consistency determination function is: in, For a single DSL clinical definition entry, This is an indicator function that outputs 1 when the compound logic condition within the square brackets is true and 0 when it is false; Consistent(e i The value 1 indicates that the DSL baseline version has not been modified by any other target editing entry since the baseline was read from the target editing entry. When Consistent(e i ) = 1 and Val in ≠ Γ(e dsl When a modification is deemed valid without concurrent conflicts, the DSL field value Val, obtained after view transformation of the current target editing entry, is used. in Override the baseline version of the DSL and simultaneously refresh the current baseline version identifier of the DSL clinical definition. and baseline update timestamp; When Consistent(e i ) = 1 and Val in = Γ(e dsl If the submission of the target editing entry does not result in any actual change, the current submission is accepted directly, and no write is performed on the DSL text presentation layer. When Consistent(e i When ) = 0, it is determined to be a concurrent conflict. The baseline version of DSL is retained, and the DSL field value of the edited content submitted at the target editing entry is pushed after view transformation. Compared with the current baseline field value Γ A comparison view of the differences is provided for manual review; After the content merging and review are completed manually, the merged standardized DSL clinical definitions will be uniformly written into the DSL text representation layer, and the current baseline version identifier of the DSL clinical definitions will be completed. And the synchronous refresh of the timestamp.

6. The method according to claim 1, characterized in that, The concept set definition includes a member list, source standard, responsible person, and version history; the derived attributes reference the concept set definition through the concept set global reference syntax, the format of which includes a concept set identifier, which is a pre-declared, independently global, and unique name of the concept set. The step of performing DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate an executable data query statement specifically includes: Lexical and syntactic analysis are performed on the clinical definition text of the DSL to generate an abstract syntax tree; Semantic validation is performed on the abstract syntax tree, including field existence validation, concept set reference validity validation, type matching validation, and circular dependency detection; the concept set reference validity validation includes performing existence validation on the global reference syntax of the concept set to confirm whether the referenced concept set definition has been defined in the DSL text representation layer; A full dependency graph is constructed based on the abstract syntax tree that has passed semantic validation. The nodes of the dependency graph are clinical definitions of the DSL, and the edges are reference relationships between declarations. The dependency graph automatically tracks the derived attribute definitions that reference the concept set definitions. Generate a query plan based on the dependency graph; The type of the target data engine is identified based on the query plan, including Hive, Doris, StarRocks, or PostgreSQL; Based on the type of the target data engine, the corresponding SQL dialect generator is invoked to translate the query plan into an executable data query statement that conforms to the syntax specification of the target data engine.

7. The method according to claim 6, characterized in that, When the member list of the concept set is changed, all affected derived attributes are marked through the dependency graph, and all reference points automatically take effect after review and confirmation; when the depth of the dependency graph exceeds the preset maximum depth threshold, a design warning is triggered. When semantic validation fails, an error message is generated and fed back to the entry point that initiated the editing operation; wherein, if the entry point is a table editing entry point, the error message is presented in the table as an error row highlight; if the entry point is a DSL text editing entry point, the error message is presented in the text editor as code annotation; if the entry point is an LLM natural language editing entry point, the error message is presented in the dialog interface as text.

8. The method according to claim 6, characterized in that, After generating a query plan based on the dependency graph and before identifying the type of the target data engine, the method further includes a materialization strategy selection step: Obtain the query frequency index, computational complexity index, and data change frequency index of the DSL clinical definition; When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is less than or equal to the third threshold, the materialization mode of full materialization into a table and periodic refresh is selected. When the query frequency index is greater than or equal to the first threshold, the computational complexity index is greater than or equal to the second threshold, and the data change frequency index is greater than the third threshold, select incremental materialization and materialization mode triggered by change data capture. When the query frequency index is less than the first threshold and the computational complexity index is greater than or equal to the second threshold, the materialization mode with the least recently used cache is selected. When the query frequency index is greater than or equal to the first threshold and the computational complexity index is less than the second threshold, the materialization mode of real-time computation virtual view is selected. When the query frequency index is less than or equal to the fourth threshold, the materialization mode of non-materialization on-demand calculation is selected, where the fourth threshold is less than the first threshold.

9. The method according to claim 1, characterized in that, When the target editing entry is the LLM natural language editing entry, the step of converting the DSL clinical definition data from different target editing entries into a unified DSL clinical definition text, and writing the unified DSL clinical definition text into the DSL text representation layer, specifically includes: The LLM to DSL converter inputs the natural language description submitted through the LLM natural language editing portal into the large language model, and the large language model outputs a DSL draft without directly generating SQL statements. The DSL draft is pushed to the medical business expert terminal, and a confirmation interface is displayed on the medical business expert terminal. In response to the confirmation operation of the medical business expert on the confirmation interface, the DSL draft is written to the DSL text presentation layer; In response to the modification operation performed by the medical business expert on the confirmation interface, the modified DSL clinical text is received and written into the DSL text presentation layer; For DSL drafts that have not been confirmed after the preset validity period, the LLM and DSL converter automatically cleans up the DSL drafts.

10. A multi-view, synchronous clinical definition data processing system, characterized in that, include: The target editing entry is used to obtain DSL clinical definition data submitted by medical business experts. The target editing entry includes a table editing entry, a DSL text editing entry, or an LLM natural language editing entry. The synchronization and conversion layer is used to convert the DSL clinical definition data from different target editing entry points into a unified DSL clinical definition text and write it into the DSL text representation layer, and in response to a data access request submitted from any of the target editing entry points, to read the corresponding DSL clinical definition text from the DSL text representation layer and present it to the medical business expert terminal in the view form corresponding to the target editing entry point. The DSL text representation layer is used as the sole authoritative source to store all DSL clinical definitions in plain text file format. All the target editing entry points are different view forms of the same authoritative definition in the DSL text representation layer. Any change to the DSL clinical definition under any target editing entry point is automatically synchronized to the corresponding view of other target editing entry points to achieve bidirectional same-source synchronization of multiple views. The types of clinical definitions in the DSL include object type definitions, derived attribute definitions, link relationship definitions, concept set definitions, queue definitions, indicator definitions, and action definitions. The concept set definition is a set of medical nomenclature terms that can be independently declared, named, and versioned to achieve global linkage of the terminology database. It is equipped with a global reference syntax for concept sets, which can be directly referenced by the object type definitions, derived attribute definitions, queue definitions, and indicator definitions through the global reference syntax for concept sets. Moreover, all reference points will automatically take effect after the member list within the concept set definition is changed. The compilation and execution layer is used to perform DSL compilation and conversion on the DSL clinical definition text in the DSL text representation layer to generate executable data query statements; The service exposure layer is used to send the executable data query statement to the target data engine for execution, obtain the corresponding query results, and output the query results to the outside world through a preset service interface.