CN112420213B - Method for inquiring drug balance according to time - Google Patents

Method for inquiring drug balance according to time Download PDF

Info

Publication number
CN112420213B
CN112420213B CN202110092857.0A CN202110092857A CN112420213B CN 112420213 B CN112420213 B CN 112420213B CN 202110092857 A CN202110092857 A CN 202110092857A CN 112420213 B CN112420213 B CN 112420213B
Authority
CN
China
Prior art keywords
information
medicine
accounting
service
drug
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110092857.0A
Other languages
Chinese (zh)
Other versions
CN112420213A (en
Inventor
高雄
姜跃滨
吕春枝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tianjian Source Technology Co ltd
Original Assignee
Beijing Tianjian Source Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tianjian Source Technology Co ltd filed Critical Beijing Tianjian Source Technology Co ltd
Priority to CN202110092857.0A priority Critical patent/CN112420213B/en
Publication of CN112420213A publication Critical patent/CN112420213A/en
Application granted granted Critical
Publication of CN112420213B publication Critical patent/CN112420213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H70/00ICT specially adapted for the handling or processing of medical references
    • G16H70/40ICT specially adapted for the handling or processing of medical references relating to drugs, e.g. their side effects or intended usage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Medicinal Chemistry (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Chemical & Material Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Pharmacology & Pharmacy (AREA)
  • Toxicology (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the invention relates to a method for inquiring drug balance according to time, which comprises the following steps: acquiring a first inquiry medicine information group and first inquiry time data; extracting all first business accounting records matched with the first inquiry medicine information group to generate a first business accounting record set; in the set, using first accounting time information earlier than and closest to the first query time data as the first time data; extracting all first service billing records with first billing time information as first time data from all the first service billing record sets to generate a first query service billing record set; in the first query service accounting record set, taking the first service accounting record with the first accounting sequence number information as the maximum value as a first query record; and extracting the first drug balance information of the first query record as a query result. By using the embodiment of the invention, on one hand, the query efficiency can be improved, and on the other hand, the query accuracy can also be improved.

Description

Method for inquiring drug balance according to time
Technical Field
The invention relates to the technical field of data information processing, in particular to a method for inquiring drug balance according to time.
Background
In the drug management system, the business processes influencing drug inventory balance mainly comprise drug warehousing, drug delivery, prescription drug distribution or medical advice drug arrangement and the like. In practical applications, hospitals have an inquiry requirement for drug balance at a certain point in time. To meet the query requirement, the drug management system will back-push from a certain time point, count the inventory changes caused by all types of business processes, and then obtain the drug inventory number at the time point. However, we find that this solution is affected by the speed and accuracy of the business statistics process, so that the query speed is slow and the accuracy is not stable.
Disclosure of Invention
The invention aims to provide a method, a computer program product and a computer readable storage medium for inquiring drug balance according to time, which configure a service accounting table for each service flow, count the real-time inventory balance when inventory modification action occurs in a service, add the modification time, the modification serial number, the real-time inventory balance and drug basic information as service accounting records into the service accounting table, and perform data analysis on all the service accounting tables to obtain the drug balance data at that time when drug balance inquiry is performed based on a certain time point; the method replaces the conventional inverse method, so that the query efficiency can be improved on one hand, and the query accuracy can be improved on the other hand.
To achieve the above object, a first aspect of embodiments of the present invention provides a method for querying a drug balance according to time, where the method includes:
acquiring a first inquiry medicine information group and first inquiry time data;
extracting all first business accounting records of which the first medicine information group is matched with the first inquiry medicine information group from each preset first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table; the first business accounting table comprises a plurality of first business accounting records; the first business accounting record comprises first accounting time information, first accounting serial number information, first medicine balance information and the first medicine information group;
in all the first service billing record sets, using the first billing time information which is prior to the first query time data and closest to the first query time data as first time data;
extracting all the first service billing records of which the first billing time information is the first time data from all the first service billing record sets to generate a first query service billing record set;
in the first query service accounting record set, taking the first service accounting record with the maximum first accounting sequence number information as a first query record;
and extracting the first drug balance information from the first query record to be used as first query drug balance data.
Preferably, the first and second liquid crystal materials are,
the first inquiry medicine information group comprises first inquiry medicine code information, first inquiry medicine basic specification information, first inquiry medicine packaging specification information, first inquiry medicine manufacturer information, first inquiry medicine batch number information and first inquiry medicine valid period information;
the first medicine information group comprises first medicine code information, first medicine basic specification information, first medicine packaging specification information, first medicine manufacturer information, first medicine price information, first medicine batch number information and first medicine expiration date information.
Preferably, the extracting, from each preset first business accounting table, all first business accounting records of which the first drug information group is matched with the first query drug information group, and generating a first business accounting record set corresponding to each first business accounting table specifically includes:
and extracting all first business accounting records of which the first medicine code information is the same as the first inquiry medicine code information, the first inquiry medicine basic specification information is the same as the first inquiry medicine basic specification information, the first medicine package specification information is the same as the first inquiry medicine package specification information, the first medicine manufacturer information is the same as the first inquiry medicine manufacturer information, the first medicine batch number information is the same as the first inquiry medicine batch number information, and the first medicine valid period information is the same as the first inquiry medicine valid period information from each first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table.
Preferably, in all the first service billing record sets, the first billing time information that is prior to the first query time data and closest to the first query time data is used as the first time data, and specifically includes:
extracting the first accounting time information which is earlier than the first query time data and closest to the first query time data in each first service accounting record set, and generating first extracted time data corresponding to each first service accounting record set; and taking the latest time in all the first extraction time data as the first time data.
Preferably, the method further comprises:
acquiring first service type data, first inventory operation time data, first inventory operation serial number data and first inventory operation record data; the first inventory operation record data at least comprises second medicine code information, second medicine basic specification information, second medicine packaging specification information, second medicine manufacturer information, second medicine price information, second medicine batch number information, second medicine validity period information and second medicine inventory balance information;
adding a new first service billing record in the first service billing table corresponding to the first service type data;
setting the first accounting time information as the first inventory operation time data in the newly added first service accounting record; setting the first accounting serial number information as the first inventory operation serial number data; setting the first medicine balance information as second medicine inventory balance information; setting the first drug code information as the second drug code information; setting the first basic specification information of the medicine as the second basic specification information of the medicine; setting the first medicine packaging specification information as the second medicine packaging specification information; setting the first drug manufacturer information as the second drug manufacturer information; setting the first medicine price information as the second medicine price information; setting the first medicine batch number information as the second medicine batch number information; and setting the first medicine validity period information as the second medicine validity period information.
Further, the first service type data comprises a medicine warehousing type, a medicine ex-warehousing type, a prescription dispensing type and a medical order dispensing type.
A second aspect of embodiments of the present invention provides a computer program product, which includes computer program code, when executed by a computer, causes the computer to perform the method of the first aspect.
A third aspect of embodiments of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the method of the first aspect.
The embodiment of the invention provides a method for inquiring drug balance according to time, a computer program product and a computer readable storage medium, wherein a business accounting table is configured for each business process, real-time inventory balance is counted when inventory modification action occurs to business, modification time, modification serial number, real-time inventory balance and drug basic information are added into the business accounting table as business accounting records, and when drug balance inquiry is carried out based on a certain time point, data analysis is carried out on all business accounting tables to obtain current drug balance data; the method replaces the conventional inverse method, so that the query efficiency can be improved on one hand, and the query accuracy can be improved on the other hand.
Drawings
Fig. 1 is a schematic diagram illustrating a method for querying a drug balance according to time according to an embodiment of the present invention;
fig. 2 is a flowchart of a process of adding the first service billing record to the first service billing table according to the second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for querying a drug balance according to time, where when a drug management system needs to query inventory balance data of a current drug according to drug information and query time input by a user, balance data can be obtained without reversely pushing all inventory records related to the drug before the time point, fig. 1 is a schematic diagram of a method for querying a drug balance according to time provided by an embodiment of the present invention, as shown in fig. 1, the method mainly includes the following steps:
step 1, acquiring a first inquiry medicine information group and first inquiry time data;
the first inquiry medicine information group comprises first inquiry medicine code information, first inquiry medicine basic specification information, first inquiry medicine packaging specification information, first inquiry medicine manufacturer information, first inquiry medicine batch number information and first inquiry medicine valid period information.
Here, the first inquiry medicine information group and the first inquiry time data are medicine information and time information for inquiry, which are acquired by the medicine management system through the information input device and input by the user; the first query drug information group includes six parameters: the method comprises the steps of firstly inquiring drug code information, firstly inquiring basic specification information of drugs, firstly inquiring package specification information of drugs, firstly inquiring manufacturer information of drugs, firstly inquiring batch number information of drugs and firstly inquiring validity period information of drugs; the data format of the first query time data supports at least year, month, day, hour, minute and second, and the minimum precision of time is at least second, and can be millisecond or less.
Step 2, extracting all first business accounting records of the first medicine information group matched with the first inquiry medicine information group from each preset first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table;
wherein the first service billing table comprises a plurality of first service billing records; the first business accounting record comprises first accounting time information, first accounting serial number information, first medicine balance information and a first medicine information group; the first medicine information group comprises first medicine code information, first medicine basic specification information, first medicine packaging specification information, first medicine manufacturer information, first medicine price information, first medicine batch number information and first medicine expiration date information;
the method specifically comprises the following steps: and extracting all first business accounting records of which the first medicine code information is the same as the first inquiry medicine code information, the first medicine basic specification information is the same as the first inquiry medicine basic specification information, the first medicine packaging specification information is the same as the first inquiry medicine packaging specification information, the first medicine manufacturer information is the same as the first inquiry medicine manufacturer information, the first medicine batch number information is the same as the first inquiry medicine batch number information, and the first medicine validity period information is the same as the first inquiry medicine validity period information from each first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table.
Here, in the data table of the drug management system, a corresponding service accounting table is configured for all service types that can modify the drug inventory records, for example, a drug warehousing service accounting table is configured for the drug warehousing service type, a drug ex-warehouse service accounting table is configured for the drug ex-warehouse service type, a prescription dispensing service accounting table is configured for the prescription dispensing service type, and a medical advice dispensing service accounting table is configured for the medical advice dispensing service type;
each business accounting table consists of a plurality of business accounting records; the business accounting record formats of all business types are the same among the accounting tables; in each business accounting record, the first accounting time information is the time for modifying the drug inventory record in the current business; the first accounting serial number information is a unique serial number which is distributed by the drug management system for distinguishing a plurality of concurrent operations at the same time point and is distributed to each action of modifying drug inventory records, and the unique serial number is gradually increased; the first drug balance information is real-time inventory balance information after the current business modifies the drug inventory records; the information of the first medicine code, the basic specification information of the first medicine, the packaging specification information of the first medicine, the information of the first medicine manufacturer, the price information of the first medicine, the batch number information of the first medicine and the validity period information of the first medicine are commodity or tube information related to the medicine; after the drug inventory records are modified every time, the drug management system acquires real-time inventory balance information and partial drug information from the modified inventory records, and adds the service accounting records to the service accounting table by combining the modification time and the unique serial number generated by the system during modification;
in this step, the drug management system queries, in each business accounting table, the business accounting records whose drug information conforms to the first query drug information group, so as to count all business accounting records related to the drug in each business accounting table, and incorporate the query result into the first business accounting record set for querying in subsequent steps.
For example, as shown in table one, the first service billing table of the drug warehousing service in the drug management system includes that the first query drug code information of the first query drug information group is "115100020210", the first query drug basic specification information is "15 ml", the first query drug packaging specification information is "15 ml", the first query drug manufacturer information is "yapei", the first query drug lot number information is "202020", and the first query drug validity period information is "2021-7-31", because the code information and the lot number information of the 2 nd first service billing record are not matched with the query information group, the first service billing record set of the first service billing table corresponding to the drug warehousing service should only include the 1 st first service billing record.
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
1 st first industry Affairs accounting record 2020-12-9 15:08:12 9025 60 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
2 nd first industry Affairs accounting record 2020-12-9 15:09:12 9066 120 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch 1
Step 3, in all the first service accounting record sets, using the first accounting time information which is before the first query time data and is closest to the first query time data as the first time data;
the method specifically comprises the following steps: extracting first accounting time information which is earlier than the first query time data and closest to the first query time data from each first service accounting record set, and generating first extracted time data corresponding to each first service accounting record set; and taking the latest time from all the first extracted time data as the first time data.
For example, 4 sets of first service billing records derived from 4 first service billing tables for 4 service types: the first service billing record set of the drug warehousing service is shown in table two, the first service billing record set of the drug ex-warehousing service is shown in table three, the first service billing record set of the prescription drug dispensing service is shown in table four, the first service billing record set of the doctor's advice drug placement service is shown in table five, and the first query time data is ' 2020-12-0915: 09:13 ';
then, in the first service billing record set of the drug warehousing service, the first extraction time data which is earlier than the "2020-12-0915: 09: 13" and is closest to the "2020-12-0915: 09: 13" shall be the billing time information "2020-12-0915: 09: 12" of the 2 nd first service billing record; the first extracted time data in the first business billing record set of the drug export business is the 1 st first business billing record with billing time information of 2020-12-0915: 08: 54; the first extracted time data in the first service billing record set of the prescription drug service is the billing time information of the 1 st first service billing record "2020-12-0915: 08: 55"; the first extraction time data in the first service billing record set of the doctor's advice medicine arrangement service is the billing time information of the 1 st and 2 nd first service billing records, namely 2020-12-0915: 09: 12; at all first extraction times data: of "2020-12-0915: 09: 12", "2020-12-0915: 08: 54", "2020-12-0915: 08: 55" and "2020-12-0915: 09: 12", the latest is "2020-12-0915: 09: 12", so the first time data is "2020-12-0915: 09: 12".
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
1 st first industry Affairs accounting record 2020-12-09 15:08:12 9025 60 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
2 nd first industry Affairs accounting record 2020-12-09 15:09:12 9066 120 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch two
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
1 st first industry Affairs accounting record 2020-12-09 15:08:54 9055 50 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch III
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
1 st first industry Affairs accounting record 2020-12-09 15:08:55 9056 40 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch four
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
1 st first industry Affairs accounting record 2020-12-09 15:09:12 9062 30 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
2 nd first industry Affairs accounting record 2020-12-09 15:09:12 9063 20 11510002 0210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch five
And 4, extracting all the first service billing records with the first billing time information as the first time data from all the first service billing record sets to generate a first query service billing record set.
Here, the extracted first service billing records from each first set of service billing records are the billing records closest in time to the first time data, and the first set of query service billing records is the set of these extracted records.
For example, the first service billing record set of the drug warehousing service is shown in table two, the first service billing record set of the drug ex-warehousing service is shown in table three, the first service billing record set of the prescription drug dispensing service is shown in table four, the first service billing record set of the order drug dispensing service is shown in table five, the first query time data is "2020-12-0915: 09: 13", the first time data is "2020-12-0915: 09: 12", and the first query service billing record set is shown in table six, and the first query service billing record set includes: the 2 nd first business billing record of table two, and the 1 st and 2 nd first business billing record of table five.
When the first account is taken Inter information First accounting order Information of column number First medicine Balance information First medicine Code information First medicine base Information of the specification First medicine bag Packaging specification information First medicine Manufacturer information First medicine Price information First medicine Batch number information The first medicine is Expiration date information
2 nd first of table two Business accounting records 2020-12-09 15:09:12 9066 120 115100020 210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
First of table five 1 Business accounting records 2020-12-09 15:09:12 9062 30 115100020 210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
2 nd first of table five Business accounting records 2020-12-09 15:09:12 9063 20 115100020 210 15 ml of 15 ml of Yapei 5.6 202020 2021-7-31
Watch six
And step 5, in the first query business accounting record set, taking the first business accounting record with the maximum first accounting serial number information as a first query record.
Here, when operating on drug inventory, multi-task concurrency at the same point in time often occurs; if it is problematic to uniquely identify a particular operational action only in terms of business operational time, the drug management system also assigns a unique serial number to each particular operation; correspondingly, in a first service accounting record of the first service accounting table, the first accounting serial number information is used for storing the first service accounting record; the unique serial number is sequentially increased, so for different accounting records with the same accounting time, if the different accounting records are to be distinguished in sequence, the operation with the largest accounting serial number is taken as the latest operation, and the operation with the smallest accounting serial number is taken as the earliest operation.
For example, the first query service billing record set is shown in table six, the first billing sequence number information of the 2 nd first service billing record in table two is 9066, the first billing sequence number information of the 1 st first service billing record in table five is 9062, and the first billing sequence number information of the 2 nd first service billing record in table five is 9063, so that the 2 nd first service billing record in table two is actually the service billing record closest to the first time data, that is, the service billing record closest to the first query time data, and the first query record is the 2 nd first service billing record in table two.
And 6, extracting first medicine balance information from the first query record to serve as first query medicine balance data.
Here, after the service billing record closest to the first query time data is obtained, the first drug balance information may be extracted therefrom and used as the final result data of the query.
For example, if the first query record is the 2 nd first business billing record of Table two, then the inventory at the time of the first query time data "2020-12-0915: 09: 13", i.e., the first query drug balance data, is "120". In 2020-12-0915: 09:13, the real-time stock of the drug with code "115100020210", basic specification "15 ml", packaging specification "15 ml", manufacturer "yapei", lot number "202020" should be 120.
In summary, it can be seen that when the drug management system needs to query inventory balance data of a current drug according to drug information and query time input by a user, only business accounting records closest to the query time need to be simply searched in a plurality of business accounting tables, on one hand, searching contents are few, searching logic is simple, and on the other hand, a statistical calculation process does not exist, so that searching efficiency is faster than before, searching effect is more accurate, and errors are less prone to occurring.
After the explanation of the process of inquiring the drug balance according to time by the embodiment, it is necessary to briefly explain the process of adding the first service accounting record of the first service accounting table.
A second embodiment of the present invention provides a processing flow for adding a first service accounting record to a first service accounting table, where after each service operates drug inventory to generate new inventory operation record data, a drug management system calculates inventory balance information from the record data, and adds current inventory operation time data, inventory operation serial number data, inventory balance information, and part of drug basic information as contents of a service accounting record to the service accounting table, where fig. 2 is a processing flow diagram for adding a first service record to the first service accounting table according to the second embodiment of the present invention, and as shown in fig. 2, the method mainly includes the following steps:
step 101, acquiring first service type data, first inventory operation time data, first inventory operation serial number data and first inventory operation record data;
the first business type data comprises a medicine warehousing type, a medicine ex-warehousing type, a prescription dispensing type and a medical advice drug placement type; the first inventory operation record data at least comprises second medicine code information, second medicine basic specification information, second medicine packaging specification information, second medicine manufacturer information, second medicine price information, second medicine batch number information, second medicine expiration date information and second medicine inventory balance information.
Here, the first service type data is a service type of the operation performed on the drug inventory at the time, and the data includes 4 common operation types: a medicine warehousing type, a medicine ex-warehousing type, a prescription dispensing type and a medical advice drug placement type; the first inventory operation time data is the time when the drug inventory is operated at the current time; the first inventory operation serial number data is a unique serial number allocated by the drug management system for the current drug inventory operation; the first inventory operation record data is the latest inventory record data in the drug database after the drug inventory is operated.
Step 102, adding a new first service billing record in the first service billing table corresponding to the first service type data.
Here, the drug management system adds a new record with empty content in the corresponding first business billing table, and fills the record with the new record in the subsequent step 103.
103, setting the first accounting time information as first inventory operation time data in the newly added first service accounting record; setting the first accounting serial number information as first inventory operation serial number data; setting the first medicine balance information as second medicine inventory balance information; setting the first medicine code information as second medicine code information; setting the first basic specification information of the medicine as the basic specification information of the second medicine; setting the first medicine packaging specification information as second medicine packaging specification information; setting the first drug manufacturer information as second drug manufacturer information; setting the first medicine price information as second medicine price information; setting the first medicine batch number information as second medicine batch number information; the first medicine expiration date information is set as second medicine expiration date information.
Here, it is practical to extract the key data from the latest inventory record data of the drug database and store the key data in the accounting record.
It should be noted that the embodiment of the present invention also provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the steps and processes of the method provided by the embodiment of the present invention.
Embodiments of the present invention further provide a computer program product, where the computer program product includes a computer program, the computer program is stored in a storage medium, and at least one processor may read the computer program from the storage medium, and execute the steps and processes of the method provided by the embodiments of the present invention.
The embodiment of the invention provides a method for inquiring drug balance according to time, a computer program product and a computer readable storage medium, wherein a business accounting table is configured for each business process, real-time inventory balance is counted when inventory modification action occurs to business, modification time, modification serial number, real-time inventory balance and drug basic information are added into the business accounting table as business accounting records, and when drug balance inquiry is carried out based on a certain time point, data analysis is carried out on all business accounting tables to obtain current drug balance data; the method replaces the conventional inverse method, so that the query efficiency can be improved on one hand, and the query accuracy can be improved on the other hand.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (7)

1. A method for querying a drug balance over time, the method comprising:
acquiring a first inquiry medicine information group and first inquiry time data;
extracting all first business accounting records of which the first medicine information group is matched with the first inquiry medicine information group from each preset first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table; the first business accounting table comprises a plurality of first business accounting records; the first business accounting record comprises first accounting time information, first accounting serial number information, first medicine balance information and the first medicine information group;
in all the first service billing record sets, using the first billing time information which is prior to the first query time data and closest to the first query time data as first time data;
extracting all the first service billing records of which the first billing time information is the first time data from all the first service billing record sets to generate a first query service billing record set;
in the first query service accounting record set, taking the first service accounting record with the maximum first accounting sequence number information as a first query record;
and extracting the first drug balance information from the first query record to be used as first query drug balance data.
2. The method for querying the balance of medicine according to time as claimed in claim 1,
the first inquiry medicine information group comprises first inquiry medicine code information, first inquiry medicine basic specification information, first inquiry medicine packaging specification information, first inquiry medicine manufacturer information, first inquiry medicine batch number information and first inquiry medicine valid period information;
the first medicine information group comprises first medicine code information, first medicine basic specification information, first medicine packaging specification information, first medicine manufacturer information, first medicine price information, first medicine batch number information and first medicine expiration date information.
3. The method according to claim 2, wherein the extracting all the first service billing records of the first drug information group matching with the first query drug information group from each preset first service billing table, and generating the first service billing record set corresponding to each first service billing table specifically comprises:
and extracting all first business accounting records of which the first medicine code information is the same as the first inquiry medicine code information, the first inquiry medicine basic specification information is the same as the first inquiry medicine basic specification information, the first medicine package specification information is the same as the first inquiry medicine package specification information, the first medicine manufacturer information is the same as the first inquiry medicine manufacturer information, the first medicine batch number information is the same as the first inquiry medicine batch number information, and the first medicine valid period information is the same as the first inquiry medicine valid period information from each first business accounting table, and generating a first business accounting record set corresponding to each first business accounting table.
4. The method according to claim 1, wherein the step of using the first billing information before and closest to the first query time data in all the first business billing record sets as the first time data comprises:
extracting the first accounting time information which is earlier than the first query time data and closest to the first query time data in each first service accounting record set, and generating first extracted time data corresponding to each first service accounting record set; and taking the latest time in all the first extraction time data as the first time data.
5. The method for querying the drug balance according to time as claimed in claim 2, wherein the method further comprises:
acquiring first service type data, first inventory operation time data, first inventory operation serial number data and first inventory operation record data; the first inventory operation record data at least comprises second medicine code information, second medicine basic specification information, second medicine packaging specification information, second medicine manufacturer information, second medicine price information, second medicine batch number information, second medicine validity period information and second medicine inventory balance information;
adding a new first service billing record in the first service billing table corresponding to the first service type data;
setting the first accounting time information as the first inventory operation time data in the newly added first service accounting record; setting the first accounting serial number information as the first inventory operation serial number data; setting the first medicine balance information as second medicine inventory balance information; setting the first drug code information as the second drug code information; setting the first basic specification information of the medicine as the second basic specification information of the medicine; setting the first medicine packaging specification information as the second medicine packaging specification information; setting the first drug manufacturer information as the second drug manufacturer information; setting the first medicine price information as the second medicine price information; setting the first medicine batch number information as the second medicine batch number information; and setting the first medicine validity period information as the second medicine validity period information.
6. The method for querying the balance of medicine according to time as claimed in claim 5,
the first business type data comprises a medicine warehousing type, a medicine ex-warehousing type, a prescription dispensing type and a medical advice drug placement type.
7. A computer-readable storage medium having stored thereon computer instructions which, when executed by a computer, cause the computer to perform the method of any of claims 1-6.
CN202110092857.0A 2021-01-25 2021-01-25 Method for inquiring drug balance according to time Active CN112420213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110092857.0A CN112420213B (en) 2021-01-25 2021-01-25 Method for inquiring drug balance according to time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110092857.0A CN112420213B (en) 2021-01-25 2021-01-25 Method for inquiring drug balance according to time

Publications (2)

Publication Number Publication Date
CN112420213A CN112420213A (en) 2021-02-26
CN112420213B true CN112420213B (en) 2021-04-09

Family

ID=74783225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110092857.0A Active CN112420213B (en) 2021-01-25 2021-01-25 Method for inquiring drug balance according to time

Country Status (1)

Country Link
CN (1) CN112420213B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113362007B (en) * 2021-06-24 2024-05-28 北京天健源达科技股份有限公司 Zero inventory record processing method
CN117594212A (en) * 2024-01-18 2024-02-23 智业软件股份有限公司 Method for accurately recording balance of inpatient

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957938A (en) * 2009-07-15 2011-01-26 力信通有限公司 Article management system and article management method
CN104794132A (en) * 2014-01-21 2015-07-22 阿里巴巴集团控股有限公司 Inventory information processing method and system
CN105446990A (en) * 2014-07-04 2016-03-30 阿里巴巴集团控股有限公司 Service data processing method and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7324998B2 (en) * 2004-03-18 2008-01-29 Zd Acquisition, Llc Document search methods and systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957938A (en) * 2009-07-15 2011-01-26 力信通有限公司 Article management system and article management method
CN104794132A (en) * 2014-01-21 2015-07-22 阿里巴巴集团控股有限公司 Inventory information processing method and system
CN105446990A (en) * 2014-07-04 2016-03-30 阿里巴巴集团控股有限公司 Service data processing method and equipment

Also Published As

Publication number Publication date
CN112420213A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN112420213B (en) Method for inquiring drug balance according to time
US8626702B2 (en) Method and system for validation of data extraction
CN110704486B (en) Data processing method, device, system, storage medium and server
CN108920498B (en) Data query method, device and equipment
CN113268500B (en) Service processing method and device and electronic equipment
CN110853715A (en) Medical data visualization processing method and system, storage medium and electronic device
CN106844320B (en) Financial statement integration method and equipment
CN112380278A (en) Financial data report generation method, device, equipment and storage medium
CN112307036A (en) Method for inputting medicine information record into medicine database
CN112115152A (en) Data increment updating and querying method and device, electronic equipment and storage medium
CN108959514B (en) Data processing method and device
CN111667225A (en) Financial data processing method and device and computer system
CN112488845B (en) Screening method and device for insuring clients, electronic equipment and storage medium
CN111242751B (en) Express order updating method, device, equipment and storage medium
CN109324963B (en) Method for automatically testing profit result and terminal equipment
CN106776913B (en) Method and device for judging user home location
CN110008264B (en) Data acquisition method and device of cost accounting system
CN114742417A (en) Data quality evaluation method and device, electronic equipment and storage medium
US7433878B2 (en) Method and system for interfacing with accounting systems
CN112232962A (en) Transaction index processing method, device and equipment
JP2017167843A (en) Transaction detail management system and transaction detail management method
CN111651466A (en) Data sampling method and device
CN113468173B (en) Data storage method, device, equipment and storage medium
CN113792048B (en) Form verification rule generation method and system for non-relational database
US20240221922A1 (en) Chaotic storage of prescription medications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant