Search

CN-122019522-A - Drug data consistency verification method and system

CN122019522ACN 122019522 ACN122019522 ACN 122019522ACN-122019522-A

Abstract

The invention relates to the technical field of data consistency verification, in particular to a drug data consistency verification method and a drug data consistency verification system, wherein a Rete algorithm is introduced in a judging stage to participate in a judging and transmitting process after field change triggering, drug key consistency record screening, judging node sequence matching, judging mark transmitting along a connecting sequence and triggering path continuous record are integrated into the same chain type processing, an AC-3 algorithm is introduced in a candidate value convergence stage to participate in a constraint checking process, and checking the dosage form value and the specification value item by item according to a pairwise relationship, performing corresponding relationship checking on the production enterprise value and the medicine name value, performing deleting processing on the candidate value which cannot meet the constraint relationship, synchronously recording the trigger field identifier and the source identifier, and promoting the consistency checking to be changed from static comparison into indexable rule constraint driving, path tracing and transmitting and constraint consistency convergence checking, thereby improving conflict positioning granularity and attribution integrity.

Inventors

  • YUN FEI
  • Liu Kangkai

Assignees

  • 常州卫生高等职业技术学校

Dates

Publication Date
20260512
Application Date
20260128

Claims (10)

  1. 1. The medicine data consistency checking method is characterized by comprising the following steps: S1, reading approval document, medicine name, dosage form, specification, production enterprise and version identification based on medicine rule items, splitting field constraint contents, collecting same field check items, completing rule identification and constraint unit binding mapping, and generating a rule constraint index set; s2, based on the rule constraint index set, performing equivalence check and inequality check on the medicine field, checking the dosage form and specification combination one by one, constructing a medicine key connection sequence, finishing relation arrangement and binding before and after judging items, and establishing a constraint judging network; S3, writing a medicine field change record based on the constraint judging network, clearing old values of corresponding fields and replacing new values, judging the fields item by item, screening medicine key consistent records, transmitting judging marks along the connection sequence, recording complete trigger paths and merging repeated conflicts to generate a rule conflict path set; S4, based on the rule conflict path set, locking the record set corresponding to the approval document, splicing the medicine core fields according to a fixed sequence, supplementing the occupation value of the missing field, comparing the multi-source field combination result layer by layer, drilling down the difference branch and marking the field position to obtain a field difference positioning set; S5, screening the medicine field candidate value based on the field difference positioning set and the rule conflict path set, checking the matching relation between the dosage form and the specification, checking the association value of the production enterprise, executing candidate value rejection and rollback switching, collecting triggering constraint sources, and generating a conflict constraint attribution set.
  2. 2. The method of claim 1, wherein the rule constraint index set includes a rule identifier, a field identifier, a constraint type identifier, a field combination identifier, and a source definition identifier, the constraint determination network includes a field determination node identifier, a field connection node identifier, a node sequence identifier, and a drug key association identifier, the rule conflict path set includes a rule identifier, a drug key identifier, a trigger field identifier set, a source identifier set, and a determination node sequence identifier, the field difference localization set includes a field identifier, a difference source identifier set, and a field sequence position identifier, and the conflict constraint attribution set includes a constraint identifier, a conflict field identifier, a candidate value source identifier, and a conflict type identifier.
  3. 3. The drug data consistency verification method according to claim 1, wherein the specific steps of generating the rule constraint index set are: based on the drug rule entries, reading approval document numbers, drug names, dosage forms, specifications, production enterprises and version identifications, splitting field constraint contents item by item according to field identifications for each rule entry, classifying and storing field equivalent limits, field unequal limits and field combination limits according to the field identifications, and merging and recording constraint items under the same field identifications to obtain a field constraint unit set; Based on the field constraint unit set, writing each field constraint unit and the corresponding rule identifier into a binding structure one by one, establishing a sequence index for the field constraint units under the same rule identifier, forming a rule level reference relation, solidifying and storing the mapping relation between the rule identifier and the field constraint units, and generating a rule constraint index set.
  4. 4. The drug data consistency verification method according to claim 1, wherein the specific steps of generating the constraint judgment network are: Based on the rule constraint index set, extracting each field constraint unit under the rule mark, performing equivalence judgment and inequality judgment on the medicine field value, performing item-by-item comparison on the dosage form value and the specification value according to a mode comparison allowable combination list, recording the judgment result according to the field sequence and generating a field judgment result sequence to obtain a field judgment sequence set; Based on the field judgment sequence set, grouping field judgment results according to the drug key identification, connecting and arranging the judgment results under the same drug key according to the rule constraint sequence, writing in the front-back dependency relationship and fixing the transmission sequence, summarizing all the rule corresponding connection structures, and establishing a constraint judgment network.
  5. 5. The drug data consistency verification method according to claim 1, wherein the specific step of generating the rule conflict path set is: Based on the constraint judging network, receiving a medicine field change record, positioning a corresponding medicine key identifier and a field identifier, executing a deleting operation on an existing field value, writing a new field value, establishing a corresponding relation between a changed field and an associated judging node thereof, forming a field input set for subsequent judgment, and generating a field judgment input set; Based on the field judgment input set, adopting a Rete algorithm to input fields under the same medicine key, matching the fields item by item according to a judgment node sequence, screening out inconsistent records of the medicine key, converting a matching result into judgment marks and sequentially transmitting the judgment marks along a node connection sequence, and continuously recording field identification and node identification combination in the transmission process to obtain a judgment transmission path set; And based on the judging transfer path set, extracting a rule identifier, a medicine key identifier and a trigger field identifier from the record reaching the complete path, performing repeated combination processing on the same rule identifier and medicine key combination, and sequentially writing the complete node into a conflict record structure to generate a rule conflict path set.
  6. 6. The method for checking consistency of drug data according to claim 5, wherein the method is characterized in that a Rete algorithm is adopted, the field judgment input set is distributed to a condition node buffer area according to field identifications, equivalence judgment and inequality judgment are performed on each field input, hit tokens are generated, the tokens are written into a left buffer area and a right buffer area of a connecting node according to drug key identifications, connection matching is performed on the left buffer area and the right buffer area of the same connecting node according to drug key identifications, when connection is successful, field binding is combined, new tokens are generated, the new tokens are sequentially written into a subsequent connecting node buffer area according to connection sequence, connection matching is repeated, and the token corresponding rule identifications of arriving terminal nodes and the trigger field identification set combining nodes are sequentially written into a judgment transmission path set.
  7. 7. The method for verifying consistency of drug data according to claim 1, wherein the specific steps of generating the field difference positioning set are: Screening approval marks in conflict records and locking corresponding multi-source record sets based on the rule conflict path set, extracting approval marks, medicine names, dosage forms, specifications, production enterprises and version identifications from records under each approval mark, sequentially arranging field values according to a preset field sequence, writing fixed occupation values into field missing positions, converting each record into a combined structure with consistent field sequence, and generating a field sequence combined set; based on the field sequence combination set, the multi-source combination structure under the same approval document is compared item by item according to the field sequence, the position where the inconsistent value of the field appears for the first time is identified, the segmentation comparison is continuously carried out on the inconsistent field backwards to confirm the difference range, the field identification corresponding to the inconsistent field and the source identification are written into the positioning structure, and the field difference positioning set is obtained.
  8. 8. The drug data consistency verification method of claim 1, wherein the specific step of generating the conflict constraint-attribution set is: Based on the field difference positioning set and the rule conflict path set, extracting a conflict related field identifier, correspondingly locking multi-source field values, writing the field values into a candidate set according to the field identifier, recording source identifiers and occurrence times for each candidate value, forming a field value set for constraint checking, and obtaining a field candidate value set; Based on the field candidate value set, checking the dosage form value and the specification value item by item according to a pair relationship by adopting an AC-3 algorithm, performing corresponding relationship checking on the production enterprise value and the medicine name value, performing deleting treatment on the candidate value which cannot meet the corresponding relationship, and synchronously recording a trigger field identifier and a source identifier to obtain a constraint rejection record set; And based on the constraint elimination record set, performing item-by-item fixing and rollback switching operation on the fields still retaining the multiple candidate values, repeatedly performing pairing check among the fields, collecting field identifiers, source identifiers and associated constraint identifiers which lead to continuous deletion of the candidate values, writing the information into an attribution structure, and generating a conflict constraint attribution set.
  9. 9. The method for checking consistency of drug data according to claim 8, wherein the AC-3 algorithm initializes an arc queue to be checked, each arc in the arc queue is composed of field pair identifiers and corresponding constraint identifiers, each field pair includes a dosage form, a specification, a manufacturing enterprise and a drug name, one arc is sequentially taken out from the arc queue, candidate value sets of a previous field are traversed, at least one candidate value satisfying a mapping table allowing a corresponding relation is searched for each candidate value in the candidate value sets of a next field, if the candidate value satisfying the relation is not found, the candidate value is deleted from the candidate sets of the previous field, field identifiers and source identifiers corresponding to the deleted candidate values are recorded, when a deletion operation occurs, all other arcs serving as the next field are added into the arc queue again to trigger a chain check, the above-mentioned processes are circularly executed until the arc queue is empty and any one candidate value set is deleted, and all deleted records are summarized with triggering constraint relationships to form a constraint rejection record set.
  10. 10. A drug data consistency check system, characterized in that the drug data consistency check method according to any one of claims 1-9, the system comprising: The rule index module is used for reading approval document, medicine name, dosage form, specification, production enterprise and version identification based on the medicine rule entry, splitting field constraint content, collecting same field check items, completing rule identification and constraint unit binding mapping, and generating a rule constraint index set; The judging network module is used for executing equivalence check and inequality check on the medicine fields based on the rule constraint index set, checking the dosage form and specification combination one by one, constructing a medicine key connection sequence, finishing the relation arrangement and binding before and after judging items, and establishing a constraint judging network; The conflict triggering module is used for writing a medicine field change record based on the constraint judging network, clearing old values of corresponding fields and replacing new values, judging the fields item by item, screening medicine key consistent records, transmitting judging marks along a connection sequence, recording complete triggering paths and merging repeated conflicts to generate a rule conflict path set; the difference positioning module is used for locking the corresponding record set of the approval document based on the rule conflict path set, splicing the medicine core fields according to a fixed sequence, supplementing the occupation value of the missing field, comparing the multi-source field combination result layer by layer, drilling down the difference branch and marking the field position to obtain a field difference positioning set; And the constraint attribution module is used for screening the candidate selection value of the medicine field based on the field difference positioning set and the rule conflict path set, checking the matching relation between the dosage form and the specification, checking the association value of the production enterprise, executing candidate value rejection and rollback switching, collecting triggering constraint sources and generating a conflict constraint attribution set.

Description

Drug data consistency verification method and system Technical Field The invention relates to the technical field of data consistency verification, in particular to a drug data consistency verification method and system. Background The technical field of data consistency verification aims at executing logic comparison processing on field values of the same business object in multiple data records, multiple data tables and multiple storage positions through preset consistency judging rules so as to judge whether a data state meets consistency constraint conditions, identify and eliminate field conflict, logic contradiction and version mismatch problems, ensure the value unification, logic integrity and business availability of data in an information system in the processes of storing, calling and transferring, and avoid business calculation errors, flow execution deviation and management risks caused by data inconsistency. A medicine data consistency verification method aims at identifying and positioning the value conflict and logic mismatch state of medicine data by executing consistency judgment on key fields of a medicine business object in a plurality of data storage positions so as to prevent business processing errors caused by inconsistent core data such as medicine names, approval letters, specifications, dosage forms and manufacturing enterprises and ensure the value consistency, logic reliability and business application safety of the medicine data in an information system. The method is characterized in that a logic comparison is carried out on multiple records, multiple data tables and multiple storage position field values according to preset consistency judging rules, the operation mode is biased to static comparison and result output, field constraint splitting granularity is insufficient, rule sources and field constraint lack binding mapping and lack of sequence reference relation are difficult to be managed in an aggregation mode under different rules, traceable indexes are difficult to be formed by constraint differences of the same field, a judging process lacks a continuous transmission judging link, a full-scale scanning or repeated comparison mode is usually adopted under a field changing scene, so that conflict triggering fields and judging paths are difficult to be precipitated and difficult to review, conflict positioning is carried out on an inconsistent field display layer, a first inconsistent position and difference range record is lacked, source identification aggregation view angle is lacked, field sequence occupation is lacked under a field deletion condition, a field sequence splicing mechanism is lacked under a multi-source record comparison condition, field sequence position misplacement is caused, error judgment is caused, combination verification coverage is insufficient, the dosage form and specification are easy to conflict with combination logic according to single-segment consistency, a lack of correspondence relation is caused to a link when a correlation boundary exists between a production enterprise and a medicine name, the layer is consistent, a conflict exists on the layer surface is caused, the inconsistent, a combination layer is still exists, a conflict value is difficult to be precipitated, a result is difficult to be checked, a second-time is not consistent, a consistency error can be caused by a service is caused to be due to a failure to be caused to calculate, and an abnormal error is caused to be caused, and can not to be caused. Disclosure of Invention The invention aims to solve the defects in the prior art, and provides a drug data consistency verification method and system. In order to achieve the purpose, the invention adopts the following technical scheme that the medicine data consistency verification method comprises the following steps: S1, reading approval document, medicine name, dosage form, specification, production enterprise and version identification based on medicine rule items, splitting field constraint contents, collecting same field check items, completing rule identification and constraint unit binding mapping, and generating a rule constraint index set; s2, based on the rule constraint index set, performing equivalence check and inequality check on the medicine field, checking the dosage form and specification combination one by one, constructing a medicine key connection sequence, finishing relation arrangement and binding before and after judging items, and establishing a constraint judging network; S3, writing a medicine field change record based on the constraint judging network, clearing old values of corresponding fields and replacing new values, judging the fields item by item, screening medicine key consistent records, transmitting judging marks along the connection sequence, recording complete trigger paths and merging repeated conflicts to generate a rule conflict path set; S4, based on the rule conflict path set, lock