A data generation method based on a DR structured dataset
By representing medical fields as evidence states and values, and using execution rules to train a generative adversarial network, the problem of inconsistent evidence states in the generation of structured medical data is solved, achieving semantic consistency in the generation process and accuracy of training data.
Patent Information
- Application Number
- CN202611696674.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
In the generation of structured medical data, the handling of null values, unexecuted checks, and missing data with unconfirmed causes lacks consistent expression and processing basis. This leads to a lack of observation basis for the association and discrimination processes that may be learned incorrectly during the generation process, affecting the semantic consistency of structured medical samples.
Medical fields are represented as associated evidence states and values. Execution rules are used to determine the fields that can be generated and those that can be discriminated. A condition table is trained to generate an adversarial network. The generator generates evidence states and values. The discriminator compares the distribution of evidence states with the distribution of conditional values of discriminable fields. Relationships with insufficient evidence do not participate in value discrimination. The generated records are verified according to the execution rules.
Maintaining consistency in the meaning of field evidence during generation, discrimination, and verification reduces conflicts where placeholder content is interpreted as inspection results, ensuring that output records retain the result content and determineable status of medical fields, thereby improving the semantic consistency of structured medical samples and the processing consistency of training data.
Smart Images

Figure CN123182885A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical information processing and data generation technology, specifically a data generation method based on DR structured datasets. Background Technology
[0002] Structured medical data generation typically uses existing medical records as its source, organizing examination items, result values, and diagnostic categories into a fixed-field sample table for medical data analysis, model training, and information system testing. During processing, field names, units of measurement, and category codes are standardized according to a data dictionary, and result records are linked through examination identifiers, forming computationally usable samples within the same examination instance. For null values in records, statistical imputation, category placeholders, or additional missing value markers can be used to convert them into model input. Continuous indicators are typically normalized, while discrete fields are represented using encoding. After this processing, records are transformed into vectors capable of simultaneously representing numerical and categorical attributes, serving as the learning objects for subsequent model generation.
[0003] Conditional table generative adversarial networks (GANs) are one method for generating structured medical samples. These networks fit a mixture distribution to continuous fields, representing the original indicators with distribution components and their values, and converting discrete fields into category vectors. During training, the conditional representation of the selected medical category is fed into the generator along with random input to produce candidate records. A discriminator then compares the distributions of real and candidate records under the corresponding conditions, adjusting the generation results through alternating training. In the generation phase, structured samples are obtained according to the target category, and the numerical and category codes are recovered through inverse transformation. Records are then filtered using the field value range and existing medical rules. For missing content, some implementations use preprocessed imputation values or missing markers in distribution learning, while others model the missing state and field values separately to preserve missing patterns in the data.
[0004] The evidentiary meaning of medical fields may lack consistent expression and processing criteria across data generation, adversarial discrimination, and rule validation. Null values may be generated due to reasons such as no inspection performed, inapplicable fields, missing results after inspection, or unconfirmed causes of missing results. However, these states have different meanings regarding whether the result is permissible, whether the field can be compared, and whether the medical relationship can be determined. Simply replacing null values with uniform numerical values or binary missing value markers might lead to the generation process learning the association between placeholder content and diagnostic categories, the discrimination process treating content lacking observational evidence as the true value for comparison, and the validation process interpreting insufficient evidence as a non-existent relationship. Even if the generated record passes single-field format checks, interpretive conflicts may still exist between its evidentiary state and the result content, affecting the semantic consistency of structured medical samples. Summary of the Invention
[0005] The purpose of this invention is to provide a data generation method based on DR structured datasets, which can solve the problems in the background art mentioned above.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] A data generation method based on DR structured dataset includes: representing fields as associated evidence status and values according to the medical field definitions and examination records of the DR structured dataset, and converting the field applicability relationship into execution rules with three judgment results: established, invalid, and insufficient evidence;
[0008] The generator and discriminable fields are determined using the execution rules. A condition table-based adversarial network is trained so that the generator sequentially generates evidence states and values. The discriminator compares the distribution of evidence states with the distribution of conditional values of the discriminable fields. Relationships with insufficient evidence are not included in the value discrimination.
[0009] The medical category conditions are input into the trained generator, and the output fields are limited according to the execution rules. The generated records are verified and output records with invalid judgment results and their evidence status.
[0010] Preferably, when determining the status of the evidence, the item identifier in the inspection record is associated with the field definition, the observed status is determined by the valid result, the uninspected status is determined by the clear unexecuted record, and the inapplicable status is determined by the field application condition not being met.
[0011] For fields with existing execution records and empty results, the field is identified as having a missing result status; for fields lacking criteria for status determination, the field is identified as having an unknown cause status.
[0012] The normal value and negative code are retained as the values corresponding to the observed state.
[0013] Preferably, the execution rule is represented as an association between the applicable conditions and the relationship to be tested;
[0014] When the applicable conditions are met, it is determined whether the fields required for the relationship to be tested have evidence based on the evidence status. If evidence is available, the relationship test is performed; if evidence is missing, insufficient evidence is returned.
[0015] When the applicable conditions are not met, the corresponding rule is marked as met and the relationship test is closed; when the evidence for the applicable conditions is insufficient, the corresponding rule is marked as insufficient evidence.
[0016] Fields that meet the applicable conditions and whose evidence status is "observed" are added to the fields that can be generated and the fields that can be judged. Fields that still have result values in the unchecked state are identified as invalid verification items.
[0017] Preferably, the generator encodes medical category conditions and random vectors into a shared representation, generates an evidence state vector from the shared representation, and uses the evidence state vector and the shared representation together to generate a field value vector;
[0018] The evidence state vector is judged according to the execution rules. The state combinations that are judged to be invalid are resampled. The values of the generateable fields are retained and output. The remaining fields are written with null values corresponding to the evidence state.
[0019] The discriminator receives an evidence state vector with medical category conditions and valid field values with the evidence state vector, respectively forming a state distribution comparison result and a condition value distribution comparison result, and transmits the training feedback of the comparison results to the evidence state generation process and the field value generation process, respectively.
[0020] Preferably, an evidence correspondence table is established between fields and inspection records, wherein the evidence correspondence table stores inspection item identifiers and inspection instance identifiers;
[0021] When determining the evidence status of a field, only the execution markers and result records within the same inspection instance are merged, and the valid result is determined according to the correction relationship referenced by the result record;
[0022] When there is no clear correction relationship and the basis for determining the status conflicts with each other, the corresponding field will be marked as evidence indeterminate, the rule that depends on the status of the field will be judged as insufficient evidence, and the value of the conflicting record will be prohibited from participating in the comparison of the distribution of condition values.
[0023] Preferably, the references of the applicable conditions to the judgment results of other rules are parsed to establish rule dependencies, and the judgment results are matched with the rule identifiers one by one;
[0024] Three judgment results are passed along the rule dependency relationship. For the conjunction condition, it returns false if any input is false, true if all inputs are true, and insufficient evidence in other cases.
[0025] For disjunctive conditions, return true if any input is true, return false if all inputs are false, and return insufficient evidence in other cases.
[0026] The generateable fields and the discriminable fields are redefined based on the applicable conditions after transmission, and the relationship test that is not supported by evidence remains in an unexecuted state.
[0027] Preferably, for continuous fields, only the effective values under the observed state are used to fit the normalization transformation;
[0028] In the field value vector, the normalized valid values are filled into the corresponding positions of the discriminable fields, and placeholder values are filled into the remaining positions. According to the execution rules, the discrimination input and value training feedback of the placeholder positions in the real records and the generated records are simultaneously blocked.
[0029] During output, only the fields that can be generated are subjected to inverse transformation, and the remaining fields are restored to null values according to the corresponding evidence status.
[0030] Preferably, when training to generate field values, medical category conditions and evidence state vectors are extracted from the real records, a shared representation is formed by the medical category conditions and the random vector, and the real evidence state vector is used to replace the generated evidence state vector as the input for generating the field value vector.
[0031] The execution rules are used to determine the common discriminable fields of the real record and the generated record. Conditional value discrimination inputs are constructed within the common discriminable fields, while keeping the medical category conditions of the real record and the generated record the same.
[0032] During the training of evidence state generation, the state distribution of the evidence state vector generated by the generator is compared with that of the real evidence state vector.
[0033] Preferably, the set of mutually dependent rules is determined for the circular references in the rule dependency relationship, and the judgment result of the lack of external evidence in the set is initialized as insufficient evidence;
[0034] Using the direct evidence provided by the inspection records and the judgment results already determined outside the set as input, the applicable conditions within the set are repeatedly calculated, and the corresponding results are updated only when it can be determined whether they are true or false based on the input.
[0035] If the rule set contains only circular references without direct evidence or if the determination of the result outside the set is insufficient, the empty result generated by the unexecuted test will not be converted to true, and the value generation of the corresponding field will remain closed and the relationship test will not be executed.
[0036] Preferably, in a single conditional value distribution comparison, the common discriminable fields determined based on the real evidence state vector are saved as a fixed field set, and the generated value verification result does not change the fixed field set;
[0037] For the execution rules involving the fixed set of fields, the actual values and generated values are used to calculate the judgment results, and the rule identifier, judgment results and related field values are combined to form a relationship discrimination fragment;
[0038] Only submit true relation discrimination fragments and generated relation discrimination fragments that both have definite judgment results under the same rule to the discriminator. If either fragment is insufficient evidence, the relation discrimination input corresponding to the rule is turned off.
[0039] The training feedback for relation discrimination is passed to the field value generation process, and the state distribution comparison of the evidence state vector and the corresponding training feedback are retained.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] 1. By representing medical fields as interrelated evidence states and values, and using the same execution rules to determine the verifiable results of generateable fields, discriminable fields, and generated records, the consistency of the evidence meaning of fields can be maintained during the generation, discrimination, and verification processes. Fields with an evidence state of "observed" and meeting the applicable conditions are entered into value generation and conditional distribution comparison. Relationships without evidence support are retained as insufficient evidence and are not used as definitive relationships in value discrimination. Normal values and negative codes are still retained as observed results, and unchecked or inapplicable fields are output as null values according to their corresponding states. The above processing ensures that the generated range of results corresponds to the range of evidence support, reducing the possibility of interpreting placeholder content as inspection results or unknown relationships as definitive conflicts, and ensuring that the output records simultaneously retain the result content and discriminable state of medical fields.
[0042] 2. At the training data processing level, associating execution records and result records according to the same inspection instance and selecting results based on explicit correction relationships reduces information mixing across inspection instances. For fields lacking explicit correction relationships and based on conflicting relationships, their values are suspended from participating in conditional distribution comparisons to reduce interference from unverified results on value learning. Continuous fields use only observed valid values to fit normalization transformations, and placeholder positions are simultaneously masked for both real and generated records to reduce the impact of placeholder values on numerical distribution and training feedback. Conditional value comparisons use a fixed set of common fields, ensuring the comparison range does not change with the verification results of generated values. In circular dependencies, rules lacking direct evidence and with established external results are considered insufficiently supported by evidence, reducing situations where unfounded determinations arise from circular references, thus enhancing the consistency of processing results from both training input and rule propagation stages. Attached Figure Description
[0043] Figure 1 Generate an overall flowchart for structured medical data;
[0044] Figure 2 A bar chart showing the field permission conditions and permission results;
[0045] Figure 3 Flowchart for the execution of three-value rules driven by evidence status;
[0046] Figure 4 A line graph was used to determine the relationship between the three-valued rules;
[0047] Figure 5 Verification chart of normalization and inverse transform within continuous field components;
[0048] Figure 6 The graph shows the generator training objective and branch feedback curves. Detailed Implementation
[0049] Please refer to Figure 1 In one embodiment, a data generation method based on a DR structured dataset is provided, comprising: representing fields as associated evidence states and values according to the medical field definitions and examination records of the DR structured dataset; converting the field applicability relationship into execution rules with three judgment results: valid, invalid, and insufficient evidence; using the execution rules to determine the fields that can be generated and the fields that can be discriminated against; training a condition table generative adversarial network; enabling the generator to generate evidence states and values sequentially; enabling the discriminator to compare the distribution of evidence states and the distribution of conditional values of discriminable fields respectively; and noting that the relationship of insufficient evidence participates in the value discrimination; inputting medical category conditions into the trained generator; limiting the value output fields according to the execution rules and verifying the generated records; and outputting the generated records and their evidence states for which there is no invalid judgment result.
[0050] In this embodiment, the DR structured dataset is stored using a combination of record tables and field dictionaries. Each row in the record table corresponds to the record status of an inspection instance at a specified data cutoff point. The field dictionary records the inspection item name, result type, and applicable conditions. The execution record saves whether the inspection was implemented and its completion status. The result record saves the numerical value, category, or explicit result missing marker. Each table is connected by the inspection item identifier and the inspection instance identifier. Results from different inspection instances are retained separately. The original identifier used to connect the records is stored separately from the medical fields involved in the learning process. After the connection is completed, an internal row number is assigned to the training record. The medical category conditions are taken from the existing category fields in the dataset. The encoding dictionary on which the category conditions are based is saved with the dataset. The field order, type conversion, and inverse transformation used in the generation process all refer to the same field dictionary.
[0051] Specifically, before a field enters the model, its original and calculated representations are saved. The original representation is used to trace the basis for status determination, while the calculated representation includes the evidence status code and values that can be interpreted by the field dictionary. The evidence status code is used to distinguish whether the result actually exists, the inspection has not been implemented, the project is not applicable, the result is still missing, or the reason for the missing result is unknown. The storage column and the result column containing the status code are set separately. The state indicating the existence of the result is not the same as the result being normal, and the state indicating the absence of the result is not the same as the result being negative. For continuous results, the original unit and the converted value are retained. For categorical results, the original code and the category position in the dictionary are retained. Empty strings, empty database markers, and placeholders in the entry system are identified through the null value description in the field dictionary. The value 0 is only treated as a null value when the source specification explicitly defines it as a null value.
[0052] In this embodiment, the execution rules are derived from the existing applicable relationships in the field dictionary and the confirmed examination record relationships. Each rule has a rule identifier, applicable conditions, and a relationship to be tested. The fields used by the rules are located through internal field identifiers. The statistical correlation between fields is not directly converted into a medical relationship that must be established. The execution flag that determines whether an examination has been performed can be used as the basis for status rules. The requirement that a result must be in the allowed coding set can be used as the basis for value rules. Relationships involving diagnostic interpretation but lacking clear evidence are retained as unconfigured states. Status rules are executed before the results are generated, and value rules are executed when the relevant results are available. Both types of rules share the evidence status interpretation table, so that the same status has a consistent meaning when inputting, generating values, and verifying records.
[0053] Generative Adversarial Networks (GANs) consist of computational paths for generating evidence states and for generating field values based on those states. The discrimination process handles both the state vector and the value vector supported by evidence. During training, real and generated records are used alternately to update the network. For fields with available results, the value vector stores the corresponding continuous or categorical representation. For fields lacking available results, placeholder positions are reserved in the value vector, and permission flags are used to block value discrimination. These placeholder positions are only used to maintain tensor arrangement and are not considered as results of actual checks. After training, medical category conditions are input, and new random inputs are extracted. Candidate records are formed in the order of state generation, permission determination, and value generation, and the same execution rules are used to obtain the verification results.
[0054] In this embodiment, the output condition for generating records is that there are no invalid judgment results in the executed rules. Insufficient evidence is saved as an independent state with the record, and no presumed conclusion is added for relationships that have not been configured. The output record includes field codes, result values, and corresponding evidence states. For relationship checks that were not executed due to insufficient evidence, the rule identifiers involved and the missing evidence types are added. For candidate records with clearly invalid results, the rule identifiers and associated field positions are saved, and the output processing of the current candidate record ends. Subsequent candidate records still use the same rule configuration. The above judgment is for relationships that have been configured and have obtained the required evidence. Unknown states saved in the generated record are not replaced with normal codes during export. Whether a record passes the verification and whether a record has complete evidence are stored separately.
[0055] In a preferred embodiment, when determining the evidence status, the item identifier in the inspection record is associated with the field definition. The observed status is determined by the valid result, the uninspected status is determined by the clear unexecuted record, and the inapplicable status is determined by the field's applicable conditions not being met. For fields with existing execution records and empty results, the result is determined to be missing. For fields lacking status determination criteria, the cause is determined to be unknown. Normal values and negative codes are retained as the values corresponding to the observed status.
[0056] Specifically, status recognition begins with the factual record of the inspection instance. Before the completion marker is recognized as evidence of execution, both the inspection item identifier and the inspection instance identifier must be consistent with the record to which the result belongs. If there is only appointment information or inspection application but no execution completion marker, it is not considered that the inspection has been carried out. Valid results must be parsable by field type and there must be no unprocessed source conflicts. If it has been clearly executed and the result column is empty, the record is considered to have a missing result. If it has been clearly not executed and the result is empty, the record is considered not inspected. If the field definition clearly limits the scope of application and the current record provides the condition fields required for judgment, then these condition fields are used to determine the applicable status. If the condition fields are missing, it is not inferred that the item is not applicable based on the result column being empty. If the inspection item is applicable but there is no execution evidence, no completion marker is added.
[0057] In a preferred embodiment, evidence status uses mutually exclusive storage codes, where 1 is used for observed, 2 for unchecked, 3 for inapplicable, 4 for missing result, 5 for unknown cause, and 6 indicates that the evidence is undetermined when there is an unresolved source conflict. The status code belongs to the coding space of the evidence status column and is interpreted separately from the category code of the inspection result itself. For example, the result category code 1 can represent negative in the field dictionary, while the evidence status code 1 only indicates that the result has been observed. When the execution record has been confirmed to be completed and the category result is negative, the evidence status code 1 and the negative result code are retained. When the execution record clearly states that it has not been implemented, the evidence status code 2 is retained and the result is kept empty. When execution information is missing and the result is empty, the evidence status code 5 is retained. The execution fact is not inferred from other records of the same medical category.
[0058] For status evidence from multiple sources, first verify whether each source describes the same inspection instance, then verify the semantic level of each field, and handle the application status, execution status, and result publication status separately. Registration of an application cannot replace completion of execution, and completion of execution cannot replace publication of the result. When execution is completed but the result has not yet been published, the result field is recorded as result missing, and the publication status is retained as an optional auxiliary field. When there is a parseable result but the execution table lacks a corresponding record, the result itself can support that the result has been observed, but the execution process field still retains its original unknown state. Rules involving the fact of execution completion can only use execution evidence or result credentials that the source specification explicitly allows to replace execution evidence, and not rewrite all status fields as completed at the same time.
[0059] Furthermore, the field applicability determination and the evidence status together form a field permission matrix. In the matrix, one row corresponds to one record, and one column corresponds to one result field. The column positions are arranged in a fixed manner according to the field dictionary. Applicability is coded with three statuses: valid, invalid, and insufficient evidence. Only positions where the applicability is valid and the evidence status is "observed" have generation permission and value discrimination permission. Permissions for other positions remain closed. When a field involves multiple applicability conditions, the overall applicability is first calculated based on the connection relationship between the conditions in the field dictionary, and then the permission for that field is determined. Whether the value relationship is valid is not used to modify the already determined permission matrix. The permission matrix is calculated according to the following formula.
[0060] ;
[0061] Where n represents the index of the record in the current processing set, and j represents the index of the result field in the field dictionary. This indicates the evidence status code for the corresponding field in the corresponding record. This is a determination code indicating the overall applicability of the field; a value of 1 indicates validity, 0 indicates invalidity, and 2 indicates insufficient evidence. This indicates field permission; a value of 1 enables the generation or value determination of the corresponding field, while a value of 0 disables the corresponding processing. This is an indicator function. The value is 1 if the condition in parentheses is true, and 0 otherwise. The equal sign indicates that the values on both sides are equal, and the multiplication sign indicates that both permission conditions are true. For example, when the inspection result has been observed and the project is applicable, both indicator values are 1, and the field permission is 1. If the result is negative, the permission is not changed. If the project applicability cannot be determined, the corresponding indicator value is 0, and this position is not entered into the value judgment.
[0062] Please refer to Figure 2 The three vertical columns sequentially fix the applicability of the fields. The evidence is categorized as invalid, valid, and insufficient; the horizontal axis represents six mutually exclusive states of evidence, while the vertical axis represents only zero or one. The black bars indicate the state of evidence. For observed indicator values, gray bars represent indicator values where applicability is valid, and diagonally striped hollow bars represent field permissions. The height of each set of permissible bars is determined by the first two conditions. In the middle column, where all three bars in the observed positions reach 1, it indicates that the field has both obtained a result and meets the applicable conditions; the permissible bars in the remaining positions are all zero. Even if the result is negative or zero, as long as... It has been observed and If the result is valid, the value can still be used in subsequent processing; if the result is missing, has conflicting sources, or its applicability is uncertain, a license cannot be granted based on an internal placeholder value.
[0063] In a preferred embodiment, an evidence correspondence table is established between fields and inspection records. The evidence correspondence table stores inspection item identifiers and inspection instance identifiers. When determining the evidence status of a field, only the execution markers and result records within the same inspection instance are merged, and the valid result is determined according to the correction relationship referenced by the result record. When there is no clear correction relationship and the status determination basis conflicts with each other, the corresponding field is marked as evidence undetermined, the rule that depends on the field status is determined as insufficient evidence, and the values of conflicting records are prohibited from participating in the condition value distribution comparison.
[0064] The evidence mapping table uses the instance identifier and field identifier as a joint locating key. Each locating key corresponds to an execution record list, a result record list, and a correction reference list. The correction reference points to the specific result record being replaced. When processing correction relationships, the directed relationships formed by the references are traversed. Records that will be explicitly corrected later are marked as historical results, and valid end records that have not been corrected are retained. The order in which result records are entered is only used for storage sorting and is not used independently as a basis for replacement. If there are different result versions of the same instance that do not point to each other, and the field dictionary does not define a merging method, then one of them is not selected as the real result based on the numerical size or record time. Instead, the corresponding field is marked as evidence undetermined. When the correction reference itself forms a cycle, the conflict mark is also retained.
[0065] For example, in the data records used to illustrate the association processing, both inspection instance 1001 and inspection instance 1002 contain result fields with the same name. If result record 201 in inspection instance 1001 is explicitly referenced and corrected by result record 202, then the training value is obtained from result record 202, and the record in inspection instance 1002 does not participate in the state calculation of inspection instance 1001. If inspection instance 1001 has another result record 203, and record 203 has a different value from record 202 without a corrected reference, then the conflicting source references are retained, and the candidate values in the result column are not included in the conditional value distribution comparison. If the relevant rule does not have sufficient evidence when it needs the definite state of this field, other results that do not depend on this field can still participate in the processing according to their own evidence. The field-level processing scope is determined by the list of input fields of the rule.
[0066] In this embodiment, source conflict handling is performed before the training data is generated. The evidence state in the training tensor retains the undetermined category of the evidence, and the original values of mutual conflicts are stored in the evidence correspondence table without being written to the valid result position. When the data maintenance process adds explicit corrected references, the state of the corresponding inspection instance is recalculated according to the same reference resolution rules, and the permission matrix that depends on the instance is updated. The update range is obtained along the association index of the field and the rule. The recalculation does not treat all source conflicts as inspection anomalies, nor does it directly delete conflict fields. Other fields that can be determined maintain their values and states. The subsequent generator learns the record representations that have resolved the source relationship or explicitly retained the uncertain state. Historical versions are retained through reference relationships and are not repeatedly included in the training samples.
[0067] Please refer to Figure 3 In a preferred embodiment, the execution rule is represented as an association between the applicable condition and the relationship to be tested. When the applicable condition is met, it is determined whether the field required for the relationship to be tested has evidence based on the evidence status. If the evidence is available, the relationship test is performed; if the evidence is lacking, insufficient evidence is returned. When the applicable condition is not met, the corresponding rule is marked as met and the relationship test is closed. When the applicable condition has insufficient evidence, the corresponding rule is marked as insufficient evidence. Fields with met applicable conditions and an observed evidence status are added to the fields that can be generated and discriminated, and fields that still have result values in the unchecked state are determined as invalid verification items.
[0068] Specifically, the rule configuration is parsed into an expression tree. Leaf nodes store field identifiers, constants, or other rule result references, while intermediate nodes store comparison operations or logical connection operations. The expression tree records the input set of the applicable conditions and the input set of the relation to be tested, respectively. For comparisons between result values, the input requirements include the observed state and the parsable values. For checking the existence of a result, the input requirements can be directly satisfied by the result existence flag, without requiring the numerical content of the result to be obtained simultaneously. For example, when the check state is clearly "not checked," checking whether the result column still has content is an existence test. The existence of content in the result column is sufficient to form a clear conflict. Whether the result value itself falls within a certain range does not participate in the evaluation of this rule, thus distinguishing between cases where the content evidence is insufficient and cases where the existence fact is clear.
[0069] The applicable conditions for field generation permission references use the already obtained inspection status, project applicable information, and fixed category conditions. Result values that have not yet been generated are not used as evidence that an inspection has occurred. For medical relationships that require multiple result values for calculation, the result values are used as input to the relationship to be tested, and the relationship comparison is performed only after the relevant fields have available content. If the applicable conditions are not met, the rule as a whole is marked as met, indicating that the current record has not triggered the requirement, and an unexecuted flag is saved. The overall metness of the rule does not mean that the relationship to be tested has been observed and confirmed. The applicability of field permission and the judgment result describing whether the rule as a whole is in breach are saved separately to avoid misinterpreting an untriggered rule as applicable to the corresponding field.
[0070] In a preferred embodiment, the references of the applicable conditions to the judgment results of other rules are parsed to establish rule dependencies, and the judgment results are matched with the rule identifiers one by one. The three judgment results are passed along the rule dependencies. For the conjunction condition, it returns false if any input is false, true if all inputs are true, and insufficient evidence otherwise. For the disjunctive condition, it returns true if any input is true, false if all inputs are false, and insufficient evidence otherwise. The generateable field and the discriminable field are re-determined according to the passed applicable conditions, and the relationship test that has not been supported by evidence is kept in an unexecuted state.
[0071] Rule dependencies are stored using an adjacency list. When the result of a rule is referenced by the applicable conditions of another rule, a directed connection is established from the referenced rule to the referencing rule, and the node position in the applicable condition expression tree where the reference occurs is saved. For rules without circular references, evaluation is performed in topological order. Each time a rule result changes from insufficient evidence to a definitive result, only rules dependent on that result are added to the computation queue; rules that have not changed are not added again. Inverted indexes are established between field permissions and corresponding applicable conditions. After the applicable conditions are re-evaluated, only the affected field columns are updated, and the update process retains the record index. Therefore, changes in the check status of a record will not directly change the field permissions of other records.
[0072] For example, the applicability of a result field is jointly determined by the applicability of the inspection item and the execution status of the inspection. If the applicability of the item is established but the execution status of the inspection is unknown, the conjunction condition is insufficient evidence, and the result field cannot be opened solely based on the applicability of the item. If the item is clearly inapplicable, even if the execution status is unknown, the conjunction condition is still not established, and the result field remains closed. For configurations that allow any qualified source of evidence to confirm the existence of the result, if one source has provided a verifiable result while the other source has not yet returned, the disjunction condition is established, and the obtained result can be processed according to the corresponding source rule. The above evaluation preserves the distinction between unknown and negation. The actual use of conjunction or disjunction relations is given by the field dictionary and the connection method is not changed temporarily based on the sample size.
[0073] In a preferred embodiment, for circular references in rule dependencies, the set of mutually dependent rules is determined, and the judgment result lacking external evidence within the set is initialized as insufficient evidence; using the direct evidence provided by the inspection record and the judgment result already determined outside the set as input, the applicable conditions within the set are repeatedly calculated, and the corresponding result is updated only when it can be determined whether it is true or false based on the input; the judgment of only circular references within the rule set without direct evidence or the result determined outside the set remains insufficient evidence, the empty result generated by the unexecuted test is not converted to true, and the value generation of the corresponding field is kept closed and the relationship test is not executed.
[0074] Specifically, a depth-first traversal is performed on the rule dependency graph, recording the access order of each rule node and the earliest access position that can be traced back. Rules that can be reached from each other along directed connections are grouped into the same strongly connected component. After shrinking each component into a single node, an acyclic dependency structure between components is obtained. Components with determined external inputs are processed according to this structure. Within components containing cycles, newly acquired evidence is propagated using a queue to be computed. The direct evidence or external results on which each determination result is based are recorded. Internal references lacking such basis are not registered as new sources of evidence. When a complete propagation does not change any determination result, the computation of the current component ends, and nodes that are still undetermined retain insufficient evidence.
[0075] In this embodiment, when the same batch of records and their evidence snapshots remain fixed, updates within a component only convert insufficient evidence into well-founded or invalid evidence. Determined results are not overwritten due to revisiting the same loop. When source data is corrected, the affected components are reinitialized and re-evaluated, rather than continuing propagation with the old results. For example, if rule A is only applicable when rule B is true, and rule B only references rule A, and neither has direct record verification support, then both rules remain insufficient evidence. If rule A also has a disjunctive input supported by a completed record verification, then rule A is determined first based on this input, and then propagated to rule B. The propagation result includes direct evidence citations, and the internal loop itself does not generate new confirmed facts.
[0076] In this embodiment, the evaluation of applicable conditions, evidence availability, and relationships to be tested is merged into a unified rule calculation interface. The interface returns a decision code, execution flag, and evidence reference for each record and each rule. Both state rules and value rules are called through this interface. The decision code of a rule is obtained by the following formula, wherein the evidence availability is checked item by item according to the evidence type required by the rule input, and the existence facts, execution facts, and specific result content are verified separately.
[0077] ;
[0078] Where k represents the execution rule index. This represents the overall judgment result of record n for rule k. This indicates the result of determining the applicable conditions of the corresponding rule. Both are represented by 1 for true, 0 for false, and 2 for insufficient evidence. This indicates whether all the evidence needed to test the relationship is available; a value of 1 indicates that all evidence is available, and a value of 0 indicates that evidence is still lacking. This indicates the result obtained by executing the relation to be tested when all evidence is available; 1 indicates true and 0 indicates false. The segmented parentheses indicate selecting the corresponding output according to the listed conditions. (Logical symbols) To indicate that at least one condition is true, logical symbols This indicates that all the conditions for connection are met simultaneously, and the record index in the subscript has the same meaning as the aforementioned permission matrix. It is calculated only if the input has evidence.
[0079] Please refer to Figure 4 , Figure 4 Overall judgment The relationship status is divided into two columns. The horizontal axis represents applicability in the order of inappropriate, incompatible, applicable inappropriate, applicable compatible, unknown inappropriate, and unknown compatible. The three states and the complete evidence marker The two states are combined. The vertical axis in the upper column corresponds to three values: invalid, valid, and insufficient evidence; the black dotted solid line indicates the relationship to be tested. If the condition is not met, the gray square dotted line indicates that the relationship is met. The lower column shows the flags for non-execution or execution under the same conditions. As can be seen from the "Applicability Alignment" column, the two overall decision lines fall on "Not Found" and "Found" respectively, and the lower column simultaneously rises to "Executed," indicating that this is only applied when applicable and the evidence is complete. The evaluation of the applicability is as follows: If the applicability is not met, although the upper column is marked as met, the lower column is still marked as not executed. This result only indicates that the rule was not triggered and cannot be interpreted as the relationship to be tested being confirmed. When the applicability is unknown, or the rule is applicable but the required evidence is lacking, both lines will return insufficient evidence; even if other fields have available values, they cannot replace the necessary evidence for the current relationship.
[0080] For example, a certain result relation only applies to completed checks. When the check is clearly not performed, the applicable condition is 0, the rule as a whole returns 1 and records that the relation check was not performed. This return value does not change the fact that the check was not performed. When the check has been completed but the result has not yet been obtained, the applicable condition is 1 and the evidence availability is 0. The rule returns 2 and does not judge the missing result as a breach of numerical relation. When the check has been completed and all required results can be parsed, both the applicable condition and the evidence availability are 1, and only then is the actual category compatibility or numerical relation comparison performed. For records where definite evidence has been obtained but the relation is not established, the overall judgment result is 0, the candidate record cannot enter the qualified output set, and insufficient evidence and indeterminate evidence are generated by different branches and stored separately.
[0081] In a preferred embodiment, the generator encodes the medical category conditions and random vectors into a shared representation, generates an evidence state vector from the shared representation, and uses the evidence state vector and the shared representation together to generate a field value vector; the evidence state vector is judged according to the execution rules, the state combinations judged as invalid are resampled, the values of the fields that can be generated are retained, and the remaining fields are written with null values corresponding to the evidence state; the discriminator receives the evidence state vector with the medical category conditions and the valid field values with the evidence state vector, respectively forming a state distribution comparison result and a condition value distribution comparison result, and transmits the training feedback of the comparison results to the evidence state generation process and the field value generation process, respectively.
[0082] Specifically, medical category conditions are converted into one-hot representations according to the category dictionary, concatenated with random vectors drawn from a continuous distribution, and then input into a feedforward network. The feedforward network generates a shared representation through linear transformation and piecewise linear activation. The state generation path outputs a category score for each field corresponding to the number of allowed evidence states. After converting each score into a normalized probability, evidence states are extracted. The field value generation path concatenates the shared representation with the state representation, outputting the numerical representation of the continuous field and the category representation of the category field, respectively. The position of each output segment is predetermined by the field dictionary. The output dimension of the evidence state column is determined by the state dictionary, and the output dimension of the result category column is determined by the result category dictionary. Therefore, the status code and the result code will not share the same output position because their integer values are the same.
[0083] The candidate state set for the state generation path is established based on the field definition. For example, fields that have never been configured for inapplicable situations can retain a general state representation, but only state combinations allowed by the execution rules can enter the value generation process. After executing the state rules on the candidate state vectors, if there are clearly invalid combinations, the state vectors are re-extracted, and the combinations that have been confirmed to be invalid are stored in the exclusion set corresponding to the current generation conditions. When there are no satisfyable state combinations for medical category conditions and fixed project requirements, a mark is returned indicating that a candidate record cannot be formed under these conditions, and the output is not continued by relaxing the execution rules. The exclusion set only records the verification results of a limited number of state combinations, does not save the complete values of the actual records, and is not directly exported as the generation result.
[0084] During training, the calculation of discrete states and class values uses continuous probability representations to propagate gradients. During forward generation, the discrete class is determined by the probability representation, and during backward computation, the gradient of the corresponding probability representation is used to approximate the gradient of the discrete selection. In specific implementation, the class score is exponentially calculated item by item and divided by the sum of the exponential values of the same group to form a normalized probability. The state rule determines the permission based on the discrete selection result, and the permission remains fixed in the current forward computation. The input of the field value generation path still retains the probability representation of the state to receive training feedback. The rule decision code and hard permission are not as freely adjustable network outputs. The network receives feedback by changing the subsequent candidate states and value distributions, but cannot directly modify the rule evaluation results.
[0085] The field value vectors are arranged with a fixed length. Continuous fields include distribution component representations and intra-component numerical representations, while category fields include category representations. Evidence state vectors are stored as independent inputs. For fields with permission closed, a pre-determined placeholder representation is written, and the permission for value discrimination at the corresponding position is set to closed. After receiving the permission flag, the discriminator only extracts the open positions, or it receives both the masked value and the permission vector in the fixed-length input. Positions with an actual value of 0 and permission open are still included in the comparison, while positions with a value placeholder of 0 and permission closed are not included in the comparison. The two are distinguished by the permission vector, and the absence of a field cannot be determined solely by whether the input value is equal to 0.
[0086] In a preferred embodiment, the continuous fields are fitted with normalization transformation using only the valid values under the observed state; in the field value vector, the normalized valid values are filled into the corresponding positions of the discriminable fields, and placeholder values are filled into the remaining positions, while the discriminative input and value training feedback of the placeholder positions in the real records and generated records are simultaneously masked according to the execution rules; during output, only the inverse transformation is performed on the generateable fields, and the null value representation is restored for the remaining fields according to the corresponding evidence state.
[0087] Specifically, for each continuous field, values for which evidence is observed, applicable, and source relationship is determined are collected individually. Gaussian mixture distribution is used to fit the different distribution components of these values. During the fitting process, the relative probability of each observation belonging to each component is repeatedly calculated, and the component proportion, mean, and dispersion are updated based on the relative probability. Placeholder values in unobserved fields are not included in the above calculations. The number of components can be determined by the variational mixture distribution fitting process, and the effective components and corresponding statistics obtained from the fitting are saved. When encoding an observation, the probability of attribution is obtained based on the fitting density and component proportion of each component for that value. Then, a component is extracted as the component identifier of that observation. The values within the component and the component identifier together constitute the calculated representation of the continuous field.
[0088] For fields containing multiple distribution components, the component identifiers are represented using one-hot methods, and the values within each component are normalized using the mean and standard deviation of the corresponding component. The generator produces component probabilities and values within each component, and during the inverse transformation, the generated components are selected and the results under the original units are restored. The normalization transformation and the inverse transformation use the same statistic saved during the training phase, and do not refit based on a batch of generated data, so that the field representations of different batches remain comparable. The normalized values within each component are calculated using the following formula.
[0089] ;
[0090] in, This represents the valid observation value of the continuous field j in record n. This indicates the index of the distribution component selected for this observation. This represents the mean of the corresponding components. The standard deviations of the corresponding components are represented, and both use the same units of measurement as the original results. This represents the dimensionless normalized value within the component; the minus sign indicates the offset of the original value relative to the component mean; the fraction bar indicates that the offset is normalized using the component scale; the constant 4 is the scale factor used in this embodiment; this transformation is only used in positions where the standard deviation is greater than 0 and the field is allowed to be open; constant components with a standard deviation of 0 are represented by fixed values and no division operation is performed; positions that are allowed to be closed directly save the placeholder representation.
[0091] Please refer to Figure 5 , combined Figure 5 Observe the intra-component coding of continuous fields: the horizontal axis is arranged in the order of the six valid observations, and the vertical axis in the upper column is the dimensionless coding value. The vertical axis in the lower column represents the original values and the values after the inverse transformation. Figure 5 The mean of the same selected component is used at each point. Approximately 88.3333, standard deviation Approximately 40.2768, processed according to four times the component scale described in the text. The offset from the component mean. The first original value of 120 corresponds to an encoding of approximately 0.1966; the fourth original value of zero corresponds to approximately -0.5483. The original value curve and the inverse transform curve in the lower column coincide at six observation points. The point-by-point absolute recovery error listed in the CSV is all zero, indicating that the saved component parameters and unit relationships remain consistent during the encoding and recovery process of these records.
[0092] For example, if a continuous field used to demonstrate encoding operations has a value of 120, and the corresponding component mean is 100 and standard deviation is 10, then the normalized value is 0.5. This value, along with the component identifier, is used in the input value discrimination process. If the generator outputs 0.25 for the same component, then during the inverse transformation, 0.25 is multiplied by 4 times the standard deviation, and then the component mean is added to recover 110. The recovered result still uses the original field unit. If the corresponding evidence state is a missing result, even if the internal value position of the value generation path produces 0.25, the above inverse transformation is not performed. Instead, the missing result state and null value are output according to the permission matrix. These values only indicate the encoding relationship. Whether they are within the field's allowed range is determined by the rules in the source field dictionary. Medical normality and abnormality are not deduced from the normalized value itself.
[0093] For continuous fields where all valid observations are identical, they are recorded as constant components. During generation, if the corresponding field is allowed to be open, it is restored to this constant; if the field is closed, the corresponding null value is still output. For fields with no valid observations in the training data, the continuous value distribution is not fitted, and no new observed numerical states are generated. The state candidate set remains as a supportable missing state based on existing evidence. When a field subsequently obtains new valid observation records, the distribution representation is rebuilt in the new training data snapshot, and the old model still uses the original encoding configuration. The above processing manages the generation of numerical values without data support separately from the already obtained state distribution, and does not use placeholder values from other fields to estimate the numerical scale of the current field.
[0094] In this embodiment, the normal, negative, and other registered results of the category field occupy independent category positions, and the reason for the missing information is represented by the evidence status column, which is not merged with the result category to form the same meaning. When judging the value of the category probability, a probability representation that can transmit gradients is used, and the original code is retrieved based on the extracted category position for the output record. Both continuous fields and category fields have their masking ranges expanded according to the permission matrix. When a field corresponds to multiple coding positions, these positions use the same field permission. The component identifier of the continuous field and the value within the component are opened or closed synchronously. Therefore, it is not possible to only mask the continuous value while still allowing the component identifier to leak the placeholder content, nor is it possible to only mask the category value while allowing the category probability of the missing position to continue to participate in the value training feedback.
[0095] In a preferred embodiment, during field value generation training, medical category conditions and evidence state vectors are extracted from real records. The medical category conditions and random vectors form a shared representation, and the generated evidence state vector is replaced by the real evidence state vector as the generation input for the field value vector. The execution rules are used to determine the discriminable fields common to the real records and the generated records. The condition value discriminative input is constructed within the common discriminable fields, while keeping the medical category conditions the same for the real records and the generated records. During evidence state generation training, the state distribution of the evidence state vector generated by the generator is compared with that of the real evidence state vector.
[0096] Specifically, state generation training and field value generation training use different input organization methods. State generation training uses medical category conditions and random vectors to generate new state combinations, which are then compared with state combinations in real records. Field value generation training obtains state vectors from real records and uses these vectors as given generation conditions. Random inputs are still responsible for generating different values under the same state conditions. This input substitution only occurs in field value generation training. When generating synthetic records, the state vectors are still generated by the state generation path. The real state vectors are not used as trainable variables. When updating the value generation path, the observed, unchecked, or unknown labels in the vectors are not changed. The candidate values generated by the generator can only be compared under fixed state conditions.
[0097] When organizing conditional value discrimination inputs, the medical category conditions, evidence status, and corresponding permission matrix of each real record are read one by one. These conditions are then bound to the generated values. The real values and generated values use the same field arrangement and the same masking position. For real records where all result fields are not open, the record is still included in the state distribution training but is not included in the conditional value discrimination input set. For records where some fields are open, only the content of the open fields is compared, while the complete state vector is retained as the discrimination condition. The discriminator obtains information on which fields currently have observational evidence based on this, but it cannot complete the value comparison based on the input difference that the real record has results while the generated record is completely empty, because the open range of both sides is determined by the same real state vector.
[0098] The discriminator can be implemented by sharing feature encodings and different output paths. The state comparison input is formed by concatenating medical category conditions and evidence state representations, while the value comparison input is formed by concatenating medical category conditions, fixed evidence states, permission matrices, and masked value representations. After linear transformation and nonlinear activation, each input outputs the probability of belonging to a real record. The state comparison and value comparison respectively store training batches and loss statistics. The input length for value comparison is determined by the field dictionary. When processing different medical categories, the condition encoding is provided along with the input. The discriminator compares the real and generated content within the same category, without treating existing value differences between different categories as errors in the generated record itself.
[0099] In a preferred embodiment, during a conditional value distribution comparison, the common discriminable fields determined based on the real evidence state vector are saved as a fixed field set, and the verification result of the generated values does not change the fixed field set; for execution rules involving the fixed field set, the judgment result is calculated using the real values and the generated values respectively, and the rule identifier, the judgment result, and the relevant field values are combined to form a relation discrimination fragment; only the real relation discrimination fragments and the generated relation discrimination fragments that both have definite judgment results under the same rule are submitted to the discriminator, and the relation discrimination input corresponding to the rule is closed when any fragment is insufficient evidence; the training feedback of relation discrimination is passed to the field value generation process, and the state distribution comparison of the evidence state vector and the corresponding training feedback are retained.
[0100] Relationship discrimination fragments are extracted based on the list of rule input fields, without directly copying the entire record. Each fragment stores the medical category conditions, the coded representation of the rule identifier, the judgment result of the rule, and the field representations involved in the relationship calculation. Real fragments and generated fragments are paired according to the rule identifier, and the field arrangement is fixed according to the input order in the rule configuration. When a rule references two result fields, the fragment stores the values of both fields simultaneously, not just the field that has changed. For rules referencing category fields, the corresponding category probability representation is used for network input. For rules referencing continuous fields, normalized representation and component identifiers are used for input, while the inverse transform values required for performing relationship testing are retained for use by the rule interface.
[0101] Specifically, rule evaluation and network discrimination use different data representations. The rule interface uses the decoded category and the original unit value to obtain a definite judgment result, while the relation discrimination path uses an encoded representation that can transmit gradients to learn the field combination. The rule identifier and the definite judgment code are sent to the discrimination path as fixed additional information. They do not perform gradient updates themselves. The gradient is generated by returning field values through continuous representations in the segment or category probabilities. When the rule only involves the category result, the feedback is transmitted by combining the aforementioned discrete selection with the inverse calculation of continuous probability. The current rule judgment is still formed based on the discrete result. Therefore, determining the truth value of the rule and updating the generated value distribution are performed separately. During training, the rule judgment code is not treated as a free variable that the generator can directly modify.
[0102] For rules that are not triggered due to the failure to meet the applicable conditions, the records of rules that are valid as a whole and those where relation checks are not performed are saved, but content fragments are not constructed by artificially supplementing the fields to be checked. When the rules are applicable and the evidence is complete, if the real relation is valid but the generated relation is invalid, both have definite judgment results and can form a paired fragment for discrimination. If the evidence for a certain item in the real record is insufficient, even if the generated value forms a seemingly definite relation result, the pair will not be sent to the relation discrimination path. Closing a relation discrimination input only affects the fragment of the corresponding rule. The comparison of single field values that have been opened will still be performed according to the fixed field set, and the state distribution comparison will also continue to be retained. Unknown relations will not cause the entire record to exit all training processes.
[0103] For example, in a real record, result field A has been observed, while result field B has not yet been obtained. Single-field value comparisons for field A remain open, while comparisons of the relational fragments requiring simultaneous acquisition of both A and B are closed. The generator cannot obtain real supervisory evidence for the relation by generating an internal candidate value for B, because the evidence state of B is still fixed by the paired real records. If both A and B have been observed, both fields belong to a fixed field set. Even if the generated value violates the configured relationship between them, the corresponding field is not deleted from the set; instead, the value judgment is retained and a relational fragment with a definite result is added. Generated content that violates the relation and content that does not have evidence to enforce the relation are assigned to different processing paths; the former generates training feedback, while the latter retains an unknown state.
[0104] In this embodiment, a state comparison sample set, a condition value comparison sample set, and a relation fragment comparison sample set are established respectively. The members of the set are determined by the evidence state and the rule execution result. When the set is empty, the loss of the corresponding branch is not calculated. For branches with samples, the generator is updated using the log loss corresponding to the true probability. The feedback of the state branch returns the state generation path, and the feedback of the value branch and the relation branch returns the field value generation path. The parameters of the shared representation receive corresponding feedback according to the actual connection. The training objectives of the generator are combined according to the following formula. The number of samples in each branch is used to calculate the average value. The number of placeholder positions is not included in the number of valid value samples.
[0105]
[0106] in, This represents the generator training loss. , , These represent the sample sets for state comparison, condition value comparison, and relation segment comparison, respectively. , , These represent the number of samples in the corresponding set, and the members of the relation set are jointly identified by the record index and the rule index; Represents the medical category condition vector. Represents the true evidence state vector. This represents the corresponding record row in the aforementioned permission matrix. This represents the generated evidence state vector. This indicates the generated value encoding that has been masked by a fixed license. This indicates a relational segment, and the hat-shaped symbol above it uniformly represents the content generated by the generator.
[0107] in, , , These represent the outputs of the discriminator's state comparison, conditional value comparison, and relational segment comparison, respectively. Each output represents the probability that the input belongs to the true data. The symbol represents the natural logarithm, the summation symbol represents the summation of all members of the corresponding set, the set affiliation symbol represents the summation index taken from the specified set, the fraction coefficient represents the average based on the number of samples, the negative sign indicates that the direction of loss reduction is to increase the probability of the generated content being judged as real, and the bold symbol represents a vector composed of multiple field codes; when a set is empty, the corresponding loss term is removed, and division with a sample size of 0 is not performed. The status code, rule code, and field index retain their aforementioned meanings in each item and are not redefined due to entering different discrimination paths.
[0108] Please refer to Figure 6 The top bar displays the generator targets according to the training steps. The data is recorded step by step, and the lower column shows the average feedback of the three discriminant branches: state, value, and relationship. The horizontal axis only represents the actual training sequence, and the curves are not smoothed or supplemented. , and Each branch determines which records or relationship segments will enter the three branches. , and This represents the number of participating members for each step. The total target for the first step is approximately 2.071058, and for the last step, it is approximately 2.081268. The thirteenth step yields the lowest value of this segment, approximately 1.990299, while the twenty-fifth step yields the highest value of this segment, approximately 2.093256. The values for the three branches in the last step are approximately 0.693131, 0.695712, and 0.692424, respectively, and the total matches the end point in the previous column. The only difference in the stepwise summation is the floating-point rounding.
[0109] For example, if a training iteration contains two real records with the same medical category, one of which has a discriminable value and the other whose result fields are all unknown, then the state comparison set contains two members, and the value comparison set contains only one member. If the single value record is still insufficient to support any configured field relationships, then the relationship set is empty, and this training only calculates the state item and the value item. When the probability of a generated input being judged as real is 0.5, its corresponding negative natural logarithm is approximately 0.693. This value is included in the average loss of its set. Unknown records do not increase the number of value samples by filling in values, nor do they stop participating in state distribution training due to the lack of relationship fragments.
[0110] When updating the discriminator, the negative natural logarithm of the true probability of the real input is calculated, and the negative natural logarithm of the non-true probability of the generated input is calculated. The average is then taken in the corresponding sets, and the discriminant parameters are updated along the direction of loss descent. When updating the generator, the discriminant parameters remain unchanged, the output of each discriminant path to the generated content is obtained again, the gradient is calculated according to the generator training objective, and then the shared representation and the parameters of the corresponding generation path are updated. When the field value training uses the real state vector, the state vector itself does not receive gradients, and the rule identifier and decision code in the relation fragment also do not receive gradients. After each update, candidate content is regenerated, and the permission matrix is always calculated from the current input state and the execution rule, without being directly replaced by the learned parameters.
[0111] In this embodiment, the training masking of placeholder positions is implemented in tensor computation through a fixed permission vector. All encoded positions corresponding to the field are multiplied by the permission value one by one. Positions with a permission of 0 are uniformly represented as placeholders before being sent to the value discrimination path. During reverse computation, the value gradient is not passed to these positions. For fields with open permissions and actual values of exactly 0, the gradient is still retained at the corresponding positions. The discrimination path obtains the permission vector at the same time, so it can distinguish between the true zero value and the closed position. The formation of relation discrimination fragments also checks whether the rule evidence is complete. It does not simply judge the usability based on the existence of numerical vectors. Although the generator has a full-length output tensor, the internal values in the output tensor do not automatically become medical observation evidence.
[0112] Training data is partitioned based on inspection instances and their source associations. Execution records, result correction records, and corresponding evidence states for the same inspection instance are placed into the same data subset to avoid assigning historical and corrected versions of the same result to record sets for different purposes. After the data subset used for distribution fitting and model updates is determined, field dictionaries, state mappings, rule configurations, and continuous value transformation statistics are saved. Validation records use the already saved transformation relationships and do not participate in numerical distribution fitting again. During model training, the results of state combination comparisons, open field value comparisons, and definitive relationship segment comparisons are recorded. The observation content is limited to the actual evidence obtained in the corresponding branch, and unknown positions are not included in the validation statistics with the filled values.
[0113] In one application embodiment, an inspection item in the input dataset has an inspection execution marker, a quantitative result field, and a result category field. The field dictionary specifies that the quantitative result participates in the comparison when the item is applicable and the result has been observed. Both normal and negative results in the result category are saved as actual results. For records where the execution is completed, the quantitative result is parseable, and the category result is normal, the evidence status of the relevant result field is observed, and it enters the value discrimination after the applicable conditions are met. For records where the execution is completed but the quantitative result is empty, the quantitative field is marked as result missing, and the published category result is still retained as its independent evidence. For records where the execution status cannot be confirmed and both results are empty, the result field is marked as cause unknown, and the state combination can still enter the state distribution learning.
[0114] When generating synthetic samples from the above application records, the state generation path generates evidence state combinations for each field based on medical category conditions. The rule interface determines whether the combination is compatible with the project's applicable requirements and inspection status, and the permission matrix accordingly opens positions with result generation conditions. If the generated quantitative field is in the observed state, the value is generated according to the corresponding continuous distribution and inversely transformed. If the quantitative field is in the result missing state, null values and result missing markers are output. When the result category field has an observed state, the result is formed from its allowed categories. Generating a negative category does not change the evidence state to uninspected. After all fields have been coded and recovered, the applicable relation test is performed. Output stops for records that are determined to be invalid, and incomplete judgment information is retained for relations with insufficient evidence.
[0115] In another preferred application scenario, inspection records originate from multiple business tables. The completion status and result release status of the same inspection instance are maintained by different tables, and the result table also contains correction records. During data processing, evidence correspondence is established through inspection instance identifiers, the current valid result is obtained by referencing the result correction, and then the evidence status of each field is calculated. If there is an irreconcilable contradiction between the completion status and the result source, only the field status affected by the contradiction is marked as evidence indeterminate, while the project applicability information that can be independently determined continues to participate in the processing with other result fields. If the rules relying on uncertain fields do not obtain sufficient evidence along the associated index, the state distribution training retains this uncertain combination, the value training closes the affected positions, and the subsequently generated data retains the structural representation of the uncertain source situation accordingly.
[0116] When generating and exporting records, medical field names and encoding formats are restored according to the field dictionary. For continuous results, the output units are restored using the saved unit conversion relationships. For categorical results, the encoding in the source specification is restored using the category mapping. Null values are written as empty results with an appended status code according to the corresponding evidence status. Independent fields or associated status tables are set for evidence status in the output format. Status information cannot be discarded while only exporting result columns. Each output record is associated with the rule configuration identifier and verification result. The verification result distinguishes between rules that are established, clearly not established, and rules with insufficient evidence. Entries with insufficient evidence retain the missing input type. No verification conclusion is generated for medical relationships that are not configured. The internal identifier of the generated record and the source check instance identifier are managed separately.
[0117] For generated records that pass verification, a processing log is further formed. The log saves the medical category conditions, the status of the generated evidence, field permissions, and the triggering rule identifiers. The distribution component identifiers of continuous fields are saved in correspondence with the coding recovery process. Candidate records where the status generation failed or the relationship is clearly invalid are saved separately for the reason of failure without being mixed into the output record set. Based on the same field dictionary and rule configuration, permission calculation and three-value verification can be re-executed to check whether the status column and value column of the output record correspond to the processing log. When a coding recovery error is found, the corresponding field transformation configuration is located. When the rule result is found to be inconsistent, the corresponding rule input evidence is located. This ensures that the status interpretation, field processing range, and output verification in the data generation process have a verifiable correspondence.
Claims
1. A data generation method based on DR structured datasets, characterized in that, include: Based on the medical field definitions and examination records of the DR structured dataset, the fields are represented as associated evidence status and values, and the field applicability relationships are converted into execution rules with three judgment results: established, invalid, and insufficient evidence. The generator and discriminable fields are determined using the execution rules. A condition table-based adversarial network is trained so that the generator sequentially generates evidence states and values. The discriminator compares the distribution of evidence states with the distribution of conditional values of the discriminable fields. Relationships with insufficient evidence are not included in the value discrimination. The medical category conditions are input into the trained generator, and the output fields are limited according to the execution rules. The generated records are verified and output records with invalid judgment results and their evidence status.
2. The data generation method based on DR structured dataset according to claim 1, characterized in that, When determining the status of the evidence, the item identifier in the inspection record is associated with the field definition. The observed status is determined by the valid results, the uninspected status is determined by the clear unexecuted records, and the inapplicable status is determined by the field's applicable conditions not being met. For fields with existing execution records and empty results, the field is identified as having a missing result status; for fields lacking criteria for status determination, the field is identified as having an unknown cause status. The normal value and negative code are retained as the values corresponding to the observed state.
3. The data generation method based on DR structured dataset according to claim 1, characterized in that, The execution rule is represented as an association between the applicable conditions and the relationship to be tested; When the applicable conditions are met, it is determined whether the fields required for the relationship to be tested have evidence based on the evidence status. If evidence is available, the relationship test is performed; if evidence is missing, insufficient evidence is returned. When the applicable conditions are not met, the corresponding rule is marked as met and the relationship test is closed; when the evidence for the applicable conditions is insufficient, the corresponding rule is marked as insufficient evidence. Fields that meet the applicable conditions and whose evidence status is "observed" are added to the fields that can be generated and the fields that can be judged. Fields that still have result values in the unchecked state are identified as invalid verification items.
4. The data generation method based on DR structured dataset according to claim 1, characterized in that, The generator encodes medical category conditions and random vectors into a shared representation, generates an evidence state vector from the shared representation, and uses the evidence state vector and the shared representation together to generate a field value vector. The evidence state vector is judged according to the execution rules. The state combinations that are judged to be invalid are resampled. The values of the generateable fields are retained and output. The remaining fields are written with null values corresponding to the evidence state. The discriminator receives an evidence state vector with medical category conditions and valid field values with the evidence state vector, respectively forming a state distribution comparison result and a condition value distribution comparison result, and transmits the training feedback of the comparison results to the evidence state generation process and the field value generation process, respectively.
5. The data generation method based on DR structured dataset according to claim 2, characterized in that, Establish an evidence mapping table between fields and inspection records. The evidence mapping table stores the inspection item identifier and the inspection instance identifier. When determining the evidence status of a field, only the execution markers and result records within the same inspection instance are merged, and the valid result is determined according to the correction relationship referenced by the result record; When there is no clear correction relationship and the basis for determining the status conflicts with each other, the corresponding field will be marked as evidence indeterminate, the rule that depends on the status of the field will be judged as insufficient evidence, and the value of the conflicting record will be prohibited from participating in the comparison of the distribution of condition values.
6. The data generation method based on DR structured dataset according to claim 3, characterized in that, The applicable conditions are analyzed to reference the results of other rule determinations, rule dependencies are established, and each determination result is assigned to a corresponding rule identifier. Three judgment results are passed along the rule dependency relationship. For the conjunction condition, it returns false if any input is false, true if all inputs are true, and insufficient evidence in other cases. For disjunctive conditions, return true if any input is true, return false if all inputs are false, and return insufficient evidence in other cases. The generateable fields and the discriminable fields are redefined based on the applicable conditions after transmission, and the relationship test that is not supported by evidence remains in an unexecuted state.
7. The data generation method based on DR structured dataset according to claim 4, characterized in that, For continuous fields, only valid values from the observed state are used to fit the normalization transformation; In the field value vector, the normalized valid values are filled into the corresponding positions of the discriminable fields, and placeholder values are filled into the remaining positions. According to the execution rules, the discrimination input and value training feedback of the placeholder positions in the real records and the generated records are simultaneously blocked. During output, only the fields that can be generated are subjected to inverse transformation, and the remaining fields are restored to null values according to the corresponding evidence status.
8. The data generation method based on DR structured dataset according to claim 7, characterized in that, When training to generate field values, medical category conditions and evidence state vectors are extracted from the real records. The medical category conditions and random vectors form a shared representation, and the real evidence state vector is used to replace the generated evidence state vector as the input for generating the field value vector. The execution rules are used to determine the common discriminable fields of the real record and the generated record. Conditional value discrimination inputs are constructed within the common discriminable fields, while keeping the medical category conditions of the real record and the generated record the same. During the training of evidence state generation, the state distribution of the evidence state vector generated by the generator is compared with that of the real evidence state vector.
9. A data generation method based on DR structured dataset according to claim 6, characterized in that, Circular references in the rule dependencies are used to determine the set of mutually dependent rules, and the judgment result of lacking external evidence in the set is initialized as insufficient evidence; Using the direct evidence provided by the inspection records and the judgment results already determined outside the set as input, the applicable conditions within the set are repeatedly calculated, and the corresponding results are updated only when it can be determined whether they are true or false based on the input. If the rule set contains only circular references without direct evidence or if the determination of the result outside the set is insufficient, the empty result generated by the unexecuted test will not be converted to true, and the value generation of the corresponding field will remain closed and the relationship test will not be executed.
10. A data generation method based on a DR structured dataset according to claim 8, characterized in that, In a conditional value distribution comparison, the common discriminable fields determined based on the real evidence state vector are saved as a fixed field set, and the generated value verification result does not change the fixed field set. For the execution rules involving the fixed set of fields, the actual values and generated values are used to calculate the judgment results, and the rule identifier, judgment results and related field values are combined to form a relationship discrimination fragment; Only submit true relation discrimination fragments and generated relation discrimination fragments that both have definite judgment results under the same rule to the discriminator. If any fragment is insufficient evidence, the relation discrimination input corresponding to the rule is turned off. The training feedback for relation discrimination is passed to the field value generation process, and the state distribution comparison of the evidence state vector and the corresponding training feedback are retained.
