Prescription distribution method, device and system
By establishing a prescription pool and task node system, based on the filtering conditions and the public prescription pool mechanism, the matching problem between prescription data and pharmacists is solved, real-time allocation and multi-dimensional matching of prescription data are achieved, ensuring that each prescription is only allocated to one pharmacist for review, meeting the business needs of Internet hospitals.
Patent Information
- Application Number
- CN202410146821.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, electronic prescriptions cannot be effectively matched with pharmacists with corresponding qualifications in Internet hospitals, resulting in random allocation, and it is impossible to guarantee that prescriptions can only be allocated to one pharmacist for review.
By establishing a task node system for the dispatch pool and the auditing end, the prescription data is matched and allocated based on the filtering conditions, ensuring that the prescription data is arranged in ascending order in the submission time, and the allocated data is stored in the public auditing pool to prevent duplicate allocation, and real-time matching between the prescription data and the auditing end and multi-dimensional accurate matching.
It realizes the exact matching between the prescription data and the auditing end, ensuring that each prescription is only assigned to one pharmacist for review, and supports flexible expansion of the auditing end and the adjustment of the multi-dimensional screening rule of prescription data to meet business needs.
Smart Images

Figure CN120412931A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent medical treatment, and particularly to a prescription allocation method, device and system. Background Art
[0002] In an Internet hospital, an electronic prescription issued by a doctor to a patient needs to be reviewed by a pharmacist before it can be used by the patient. Electronic prescriptions in the business of Internet hospitals are classified into many types, for example, classified according to traditional Chinese and Western medicines, and classified according to doctor levels. Different types of electronic prescriptions need to be allocated to pharmacists with corresponding qualifications. In the prior art, electronic prescriptions are generally randomly allocated to pharmacists, resulting in the inability to achieve the matching between prescriptions and pharmacists, and it cannot be guaranteed that a prescription can only be allocated to one pharmacist. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a prescription allocation method, device and system, which can achieve the matching between prescription data to be reviewed and the review end, and realize the real-time allocation of prescription data to be reviewed.
[0004] To achieve the above object, according to one aspect of the present invention, a prescription allocation method is provided.
[0005] The prescription allocation method of the embodiments of the present invention includes: receiving prescription data to be reviewed, and storing the received prescription data to be reviewed in a pre-established prescription pool; querying, from the prescription pool, target prescription data that meets the screening conditions preset by the review end based on a task node created for the review end in an online state, and storing the identifier of the queried target prescription data in the prescription queue of the review end; where the identifiers of the target prescription data in the same prescription queue are arranged in ascending order according to the prescription submission time; and allocating the target prescription data to the corresponding review end according to the data arrangement order of the prescription queue.
[0006] Optionally, the method further includes: storing the identifier of the queried target prescription data in a pre-established common prescription review pool before, after or at the same time as storing the identifier of the queried target prescription data in the prescription queue of the review end; and excluding the target prescription data indicated by the common prescription review pool from the query request sent by the task node to the prescription pool.
[0007] Optionally, the allocating the target prescription data to the corresponding review end according to the data arrangement order of the prescription queue includes: in response to reaching the allocation opportunity of any review end, determining the identifier of the target prescription data at the head of the queue in the prescription queue of the review end as the identifier to be allocated; querying the corresponding target prescription data in the prescription pool according to the identifier to be allocated, and allocating the queried target prescription data to the review end.
[0008] Optionally, the method further includes: in response to an online instruction issued by any review terminal, determining the status of the review terminal as the online status, creating a temporary node for the review terminal to store the feature data of the review terminal, including the review terminal identifier and the screening condition; creating a corresponding task node for the review terminal according to the review terminal identifier stored in the temporary node, and reading the screening condition from the temporary node based on the created task node to execute the query of the target prescription data.
[0009] Optionally, the method further includes: in response to an offline instruction issued by any review terminal, determining the status of the review terminal as the offline status; deleting the data in the prescription dispensing queue of the review terminal and the corresponding data of the review terminal in the public prescription review pool based on the task node of the review terminal, and destroying the task node and the temporary node of the review terminal.
[0010] Optionally, the method further includes: monitoring the heartbeat signal sent by any review terminal based on the task node of the review terminal; when it is determined according to the heartbeat signal that the review terminal has an abnormality, deleting the data in the prescription dispensing queue of the review terminal and the corresponding data of the review terminal in the public prescription review pool based on the task node of the review terminal, and destroying the task node and the temporary node of the review terminal.
[0011] Optionally, the prescription dispensing queue is an ordered set, the identifier of the target prescription data is used as an element in the prescription dispensing queue, and the prescription submission time of the target prescription data is used as the score of the corresponding element; the screening condition is based on at least two of the following dimensions: prescription specialty type, prescription business type, doctor level of prescribing the prescription, prescription automatic review result, and current prescription status.
[0012] To achieve the above object, according to another aspect of the present invention, a prescription dispensing device is provided.
[0013] The prescription dispensing device according to the embodiment of the present invention includes: a receiving unit, configured to receive the prescription data to be reviewed and store the received prescription data to be reviewed in a pre-established dispensing pool; a query unit, configured to query, based on the task node created for the review terminal in the online state, the target prescription data that meets the screening conditions preset by the review terminal from the dispensing pool, and store the identifier of the queried target prescription data in the prescription dispensing queue of the review terminal; where the identifiers of the target prescription data in the same prescription dispensing queue are arranged in ascending order according to the prescription submission time; an allocation unit, configured to allocate the target prescription data to the corresponding review terminal according to the data arrangement order of the prescription dispensing queue.
[0014] To achieve the above object, according to still another aspect of the present invention, a prescription dispensing system is provided.
[0015] The prescription distribution system according to an embodiment of the present invention includes: a prescription pool, a task center, and a prescription dispatch queue. The task center contains task nodes created for the review terminals in the online state. Among them, the prescription pool receives and stores the prescription data to be reviewed. The task node queries the target prescription data that meets the screening conditions preset by the corresponding review terminal from the prescription pool, and stores the identifiers of the queried target prescription data into the prescription dispatch queue of the review terminal. Among them, the identifiers of the target prescription data in the same prescription dispatch queue are arranged in ascending order according to the prescription submission time. The task node distributes the target prescription data to the corresponding review terminal according to the data arrangement order of the prescription dispatch queue.
[0016] Optionally, the system further includes: a public prescription review pool, a discovery center, and a scheduler. Among them, before, after, or at the same time as storing the identifiers of the queried target prescription data into the prescription dispatch queue of the review terminal, the task node stores the identifiers of the queried target prescription data into a pre-established public prescription review pool. And, the task node excludes the target prescription data indicated by the public prescription review pool from the query request sent to the prescription pool. In response to the online instruction issued by any review terminal, the discovery center determines the status of the review terminal as the online state, and creates a temporary node for the review terminal to store the characteristic data of the review terminal, including the review terminal identifier and the screening conditions. The scheduler creates a corresponding task node for the review terminal in the task center according to the review terminal identifier stored in the temporary node, and the created task node reads the screening conditions from the temporary node to execute the query of the target prescription data.
[0017] To achieve the above object, according to another aspect of the present invention, an electronic device is provided.
[0018] An electronic device according to the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the prescription distribution method provided by the present invention.
[0019] To achieve the above object, according to yet another aspect of the present invention, a computer-readable storage medium is provided.
[0020] A computer-readable storage medium according to the present invention stores a computer program thereon, and when the program is executed by a processor, it implements the prescription distribution method provided by the present invention.
[0021] According to the technical solution of the present invention, the above-mentioned embodiments in the present invention have the following advantages or beneficial effects:
[0022] The prescription distribution system (hereinafter referred to as the system) first receives the prescription data to be audited and stores the received prescription data to be audited in the prescription dispatch pool. Then, based on the task nodes created for the audit terminals in the online state, it queries the target prescription data that meets the screening conditions preset by the audit terminals from the prescription dispatch pool, and stores the identifiers of the queried target prescription data in the prescription dispatch queue of the audit terminals. The identifiers of the target prescription data in the same prescription dispatch queue are arranged in ascending order according to the prescription submission time. Finally, the system distributes the target prescription data to the corresponding audit terminals according to the data arrangement order of the prescription dispatch queue. Through the above steps, the matching between the prescription data to be audited and the audit terminals is realized, and the real-time distribution of the prescription data to be audited is realized based on the system architecture including the discovery center, scheduler, task center, prescription dispatch queue, and prescription dispatch pool. In addition, in the embodiment of the present invention, by storing the identifiers of the allocated prescription data in the public prescription audit pool and excluding the data in the public prescription audit pool from the query requests of the task nodes for the prescription dispatch pool, it is ensured that a piece of prescription data to be audited can only be allocated to one audit terminal. Finally, in the embodiment of the present invention, through the multi-dimensional joint query of the task nodes for the prescription dispatch pool, the multi-dimensional accurate matching between the prescription data to be audited and the audit terminals is realized, and the audit terminals can flexibly expand the screening rules of the prescription data after each online, thereby better meeting the business requirements.
[0023] The further effects of the above non-conventional optional methods will be described in conjunction with the specific embodiments below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:
[0025] Figure 1 is a schematic diagram of the main steps of the prescription distribution method in the embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of the overall architecture of the prescription distribution method in the embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of the specific execution steps of the task node in the embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of the components of the prescription distribution device in the embodiment of the present invention;
[0029] Figure 5 is an exemplary system architecture diagram to which the embodiment of the present invention can be applied;
[0030] Figure 6 is a schematic diagram of the structure of an electronic device for implementing the prescription distribution method in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The following describes exemplary embodiments of the present invention in conjunction with the accompanying drawings. Various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, descriptions of well-known functions and structures are omitted in the following description for clarity and conciseness.
[0032] It should be noted that, without conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0033] Figure 1 It is a schematic diagram of the main steps of the prescription dispensing method according to the embodiments of the present invention.
[0034] As Figure 1 shown, the prescription dispensing method of the embodiments of the present invention can be executed by a prescription dispensing system, and the specific execution steps are as follows:
[0035] Step S101: Receive the prescription data to be reviewed, and store the received prescription data to be reviewed in a pre-established dispatching pool.
[0036] In practical applications, after a doctor in an Internet hospital issues an electronic prescription to a patient, a professional review terminal needs to review the electronic prescription and only provide it to the patient after the review is passed. The review terminal, such as a pharmacist terminal, can be used to review the drug ingredients, dosages, combinations, etc. in the prescription data to be reviewed. Each piece of prescription data to be reviewed has a unique identifier and prescription medication details (including drug ingredients, dosages, etc.). Preferably, it can also have at least two of the following dimensions of data: prescription professional type, prescription business type, doctor level of prescribing the prescription, prescription automatic review result, and current prescription status. Exemplarily, the value of the prescription professional type can be a traditional Chinese medicine prescription or a western medicine prescription; the value of one prescription business type can be ordinary consultation or post-consultation management, and the value of another prescription business type can be graphic consultation, telephone consultation, or video consultation; the value of the doctor level of prescribing the prescription can be from level 0 to level 7, where levels 0 to 4 belong to junior doctors and levels 5 to 7 belong to senior doctors; the prescription automatic review result refers to the review suggestions calculated by an automatic program or an artificial intelligence model, and its value can be recommended to pass or recommended not to pass; the value of the current prescription status can be effective or ineffective.
[0037] In this step, after the upstream system determines the prescription data to be reviewed, it can transmit the prescription data to be reviewed to the dispatching pool of the prescription dispensing system. Exemplarily, the dispatching pool can be built based on the Elasticsearch (ES) search engine and is used to provide query of the prescription data to be reviewed stored therein.
[0038] Step S102: Query target prescription data that meets the screening conditions preset by the review terminal from the dispatching pool based on the task nodes created for the review terminals in the online state, and store the identifiers of the queried target prescription data in the dispatching queue of the review terminal.
[0039] In the prescription allocation system of the embodiment of the present invention, the discovery center is used to perform service discovery and scheduling for the review terminals. In a specific application, the discovery center can be implemented based on existing frameworks such as Zookeeper and Dubbo. When any review terminal goes online or recovers from an abnormal state, it can send an online instruction (i.e., clock in) to the discovery center based on operations such as a person's click. The discovery center determines the status of the review terminal as the online state and creates a temporary node for the review terminal to store the characteristic data of the review terminal, including the review terminal identifier and the screening conditions. Exemplarily, the screening conditions can be formulated by the review terminal or other business terminals and can include conditions in at least the following two dimensions: prescription specialty type, prescription business type, doctor level of prescribing the prescription, prescription automatic review result, and current status of the prescription. For example, the screening conditions of a certain review terminal are: the value of the prescription specialty type is a traditional Chinese medicine prescription, the value of the prescription business type is graphic consultation, the value of the doctor level of prescribing the prescription is from level 0 to level 5, the value of the prescription automatic review result is recommended for approval, and the value of the current status of the prescription is effective; the screening conditions of another review terminal are: the value of the prescription specialty type is a western medicine prescription, and the value of the doctor level of prescribing the prescription is level 0 and level 1. The review terminal can modify its screening conditions each time it goes online or at other appropriate times, so as to achieve flexible expansion and timely adjustment of the prescription screening conditions of each review terminal.
[0040] After that, the discovery center can send a notice to the scheduler. After receiving the notice, the scheduler can create a corresponding task node for the review terminal in the task center according to the review terminal identifier stored in the temporary node. After the task node is created, it can regularly read the screening conditions of the review terminal from the temporary node to perform subsequent data queries. In practical applications, the task center and task nodes can be implemented based on the timed task framework ElasticJob, etc.
[0041] In this step, the task node periodically queries the target prescription data that meets the screening conditions preset by the corresponding review terminal from the prescription dispatching pool, and stores the identifiers of the queried target prescription data into the prescription dispatching queue created for the corresponding review terminal. Preferably, the prescription dispatching queue is an ordered set, such as the Zset set in Redis. The identifiers of the target prescription data in the same prescription dispatching queue can be arranged in ascending order of the prescription submission time, that is, in the order from the head to the tail of the queue, the prescription submission times of the target prescription data increase from small to large, and the target prescription data at the head of the queue is the earliest stored in the prescription dispatching queue. Taking the Zset set as an example, the above identifiers of the target prescription data are used as elements in the prescription dispatching queue, and the prescription submission time of the target prescription data is used as the score of the corresponding element. The prescription dispatching queue is a lightweight component, which only stores the identifiers of the target prescription data, and other parts of the target prescription data are still stored in the prescription dispatching pool. When needed later, the target prescription data is read from the prescription dispatching pool according to the identifier of the target prescription data, so as to ensure the high availability of the prescription dispatching queue.
[0042] Step S103: Allocate the target prescription data to the corresponding review terminal according to the data arrangement order of the prescription dispatching queue.
[0043] In this step, when the allocation opportunity of any review terminal arrives, the prescription allocation system can allocate the target prescription data to the review terminal according to the data arrangement order of the prescription dispatching queue. The above allocation opportunity can be a time-based opportunity (such as a predetermined time based on a timing rule) or an event-based opportunity (such as the current prescription review of the review terminal is completed). Specifically, the prescription allocation system first determines the identifier of the target prescription data at the head of the queue in the prescription dispatching queue of the review terminal as the identifier to be allocated, and then queries the corresponding target prescription data in the prescription dispatching pool according to the identifier to be allocated, and allocates the queried target prescription data to the review terminal. Based on the above automatic sorting function of the prescription dispatching queue, the prescription data with the earliest submission time can be pushed directly without calculation, which helps to realize the real-time allocation of prescriptions.
[0044] In a preferred technical solution, before, after, or at the same time as storing the identifier of the queried target prescription data into the prescription dispatch queue of the review end, the task node can store the identifier of the queried target prescription data into a pre-established common prescription review pool. Moreover, the query request sent by any task node to the dispatch pool excludes the target prescription data indicated by the common prescription review pool, that is, the query conditions of the query request exclude the target prescription data currently stored in the common prescription review pool. The technical principle of the common prescription review pool is that after the prescription data to be reviewed enters the prescription distribution system, it is first stored in the dispatch pool. Subsequently, two actions of distribution and review need to be performed. The distribution action includes being queried by the task node and pushed to the prescription dispatch queue, and the review action includes the review end obtaining the prescription data to be reviewed and performing the review. After the review is completed, the data is deleted from the dispatch pool. In this way, before a piece of prescription data to be reviewed is distributed to a review end and before the review is completed, it may be queried by the task node of another review end with the same or similar screening conditions and be redistributed, resulting in the same prescription data to be reviewed possibly being distributed to multiple review ends, causing distribution chaos.
[0045] In one embodiment, the above problem can be solved by data marking in the dispatch pool, that is, a specific mark is used in the dispatch pool to mark the prescription data to be reviewed that has been currently distributed but not yet reviewed and its current review end, and the data with the specific mark is excluded in subsequent query requests. Moreover, when the current review end of the data with the specific mark has an exception or goes offline, the specific mark of these data is deleted to restore the queryable state. Although this method can solve the above problem of distribution chaos, it requires frequent write operations to be performed on the dispatch pool database, which has a greater impact on the performance of the dispatch pool.
[0046] Aiming at the problems of the above method, the embodiment of the present invention provides a better solution, that is, the above common prescription review pool solution. After any prescription data to be reviewed is queried by the task node of a review end, the task node can store the identifier of the prescription data to be reviewed in the common prescription review pool (the storage time can be before, after, or at the same time as pushing the identifier to the prescription dispatch queue). Subsequently, the query requests of any node exclude the prescription data to be reviewed in the common prescription review pool. In this way, the prescription data to be reviewed will not be distributed to other review ends subsequently, avoiding distribution chaos. Before the prescription data to be reviewed is completed, if the current review end has an exception or goes offline, the task node can delete the identifier of the prescription data to be reviewed in the common prescription review pool. Since the full amount of data of the prescription data to be reviewed is still stored in the dispatch pool, it is equivalent to restoring the queryable state of the prescription data to be reviewed, ensuring that the prescription data to be reviewed can be queried by the review end that is online and in a normal state. If the prescription data to be reviewed is completed, the relevant data in the common prescription review pool and the dispatch pool can be deleted. Through the above solution, it is possible to ensure that one prescription can only be distributed to one review end without affecting the read and write performance of the dispatch pool.
[0047] In an embodiment of the present invention, if any audit terminal issues a logout instruction, the prescription distribution system determines the status of the audit terminal as the offline state. The task node of the audit terminal deletes the data in the prescription distribution queue of the audit terminal, deletes the corresponding data of the audit terminal in the public prescription review pool, and destroys the task node and the temporary node of the audit terminal. In addition, the task node of any audit terminal monitors the heartbeat signal sent by the audit terminal; when it is determined according to the heartbeat signal that the audit terminal has an abnormality, the task node of the audit terminal deletes the data in the prescription distribution queue of the audit terminal, deletes the corresponding data of the audit terminal in the public prescription review pool, and destroys the task node and the temporary node of the audit terminal.
[0048] Through the above steps, the matching between the prescription data to be reviewed and the audit terminal is achieved. Based on the system architecture including the discovery center, scheduler, task center, prescription distribution queue, and prescription distribution pool, the real-time distribution of the prescription data to be reviewed is realized, and the multi-dimensional accurate matching between the prescription data to be reviewed and the audit terminal is realized through the multi-dimensional joint query of the prescription distribution pool by the task node.
[0049] Figure 3 It is a schematic diagram of the specific execution steps of the task node in an embodiment of the present invention, as Figure 3 shown. The task node is used to execute the following timed task process, which is executed once every predetermined time period until the corresponding audit terminal logs out or has no heartbeat. In a task process, the task node first determines whether the corresponding audit terminal is timed out or logged out by querying the discovery center. If it is timed out or logged out, the relevant data of the audit terminal in the prescription distribution queue and the public prescription review pool are cleared, so that the prescription data that has been assigned to the audit terminal can be assigned to other audit terminals thereafter; if it is not timed out and not logged out, the screening conditions of the audit terminal are obtained from the temporary node of the audit terminal, and the target prescription data is queried in the prescription distribution pool according to the screening conditions (the data in the public prescription review pool can be excluded in the query request) and stored in the prescription distribution queue, and then the target prescription data is pushed to the audit terminal when the distribution timing of the audit terminal arrives, so as to complete the real-time distribution of the prescription data to be reviewed at the audit terminal.
[0050] In the technical solution of the embodiment of the present invention, the prescription distribution system first receives the prescription data to be reviewed and stores the received prescription data to be reviewed in the prescription dispatch pool; then queries the target prescription data that meets the screening conditions preset by the review terminal from the prescription dispatch pool based on the task node created for the review terminal in the online state, and stores the identifier of the queried target prescription data in the prescription dispatch queue of the review terminal, where the identifiers of the target prescription data in the same prescription dispatch queue are arranged in ascending order of the prescription submission time; finally, the system distributes the target prescription data to the corresponding review terminal according to the data arrangement order of the prescription dispatch queue. Through the above steps, the matching between the prescription data to be reviewed and the review terminal is realized, and the real-time distribution of the prescription data to be reviewed is realized based on the system architecture including the discovery center, scheduler, task center, prescription dispatch queue, and prescription dispatch pool. In addition, the embodiment of the present invention ensures that a piece of prescription data to be reviewed can only be assigned to one review terminal by storing the identifier of the assigned prescription data in the public review prescription pool and excluding the data in the public review prescription pool from the query request of the task node for the prescription dispatch pool. Finally, the embodiment of the present invention realizes the multi-dimensional accurate matching between the prescription data to be reviewed and the review terminal through the multi-dimensional joint query of the task node for the prescription dispatch pool, and the review terminal can flexibly expand the screening rules of the prescription data after each online, thereby better meeting the business requirements.
[0051] It should be noted that in the technical solution of the present invention, the aspects such as the collection, collection, update, analysis, processing, use, transmission, and storage of the user's personal information that may be involved all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken for the user's personal information to prevent illegal access to the user's personal information data, and to maintain the security of the user's personal information, network security, and national security.
[0052] For the foregoing method embodiments, for the convenience of description, they are expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, and certain steps can actually be performed in other sequences or simultaneously. In addition, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential for implementing the present invention.
[0053] To facilitate the better implementation of the above solution of the embodiment of the present invention, the following also provides related devices for implementing the above solution.
[0054] Please refer to Figure 4 As shown, the prescription distribution device 400 provided by the embodiment of the present invention may include: a receiving unit 401, a query unit 402, and a distribution unit 403.
[0055] Among them, the receiving unit 401 can be used to receive the prescription data to be audited and store the received prescription data to be audited in a pre-established prescription dispatching pool; the query unit 402 can be used to query target prescription data that meets the screening conditions preset by the auditing end from the prescription dispatching pool based on the task nodes created for the auditing ends in the online state, and store the identifiers of the queried target prescription data into the prescription dispatching queue of the auditing end; among them, the identifiers of the target prescription data in the same prescription dispatching queue are arranged in ascending order of the prescription submission time; the allocation unit 403 can be used to allocate the target prescription data to the corresponding auditing end according to the data arrangement order of the prescription dispatching queue.
[0056] In an embodiment of the present invention, the query unit 402 can be further used to: before, after or at the same time as storing the identifiers of the queried target prescription data into the prescription dispatching queue of the auditing end, store the identifiers of the queried target prescription data into a pre-established public prescription auditing pool; and exclude the target prescription data indicated by the public prescription auditing pool from the query request sent by the task node to the prescription dispatching pool.
[0057] In a specific application, the allocation unit 403 can be further used to: in response to reaching the allocation opportunity of any auditing end, determine the identifier of the target prescription data at the head of the queue in the prescription dispatching queue of the auditing end as the identifier to be allocated; query the corresponding target prescription data in the prescription dispatching pool according to the identifier to be allocated, and allocate the queried target prescription data to the auditing end.
[0058] In actual application, the device 400 can further include a management unit, which is used to: in response to an online instruction sent by any auditing end, determine the state of the auditing end as the online state, create a temporary node for the auditing end to store the characteristic data of the auditing end, including the auditing end identifier and the screening conditions; create a corresponding task node for the auditing end according to the auditing end identifier stored in the temporary node, and read the screening conditions from the temporary node based on the created task node to execute the query of the target prescription data.
[0059] As a preferred solution, the management unit can be further used to: in response to an offline instruction sent by any auditing end, determine the state of the auditing end as the offline state; delete the data in the prescription dispatching queue of the auditing end and delete the corresponding data of the auditing end in the public prescription auditing pool based on the task node of the auditing end, and destroy the task node and the temporary node of the auditing end.
[0060] Preferably, the governance unit may further be configured to: monitor the heartbeat signal sent by any audit terminal based on the task node of the audit terminal; when it is determined according to the heartbeat signal that the audit terminal is abnormal, delete the data in the dispatching queue of the audit terminal and delete the corresponding data of the audit terminal in the public audit pool based on the task node of the audit terminal, and destroy the task node and the temporary node of the audit terminal.
[0061] In addition, in the embodiment of the present invention, the dispatching queue is an ordered set, the identifier of the target prescription data is used as an element in the dispatching queue, and the prescription submission time of the target prescription data is used as the score of the corresponding element; the screening conditions are based on at least two of the following dimensions: prescription specialty type, prescription business type, doctor level of prescribing the prescription, prescription automatic audit result, and current status of the prescription.
[0062] According to the technical solution of the embodiment of the present invention, the prescription distribution system first receives the prescription data to be audited and stores the received prescription data to be audited in the dispatching pool; then queries the target prescription data that meets the screening conditions preset by the audit terminal from the dispatching pool based on the task node created for the audit terminal in the online state, and stores the identifier of the queried target prescription data in the dispatching queue of the audit terminal, where the identifiers of the target prescription data in the same dispatching queue are arranged in ascending order according to the prescription submission time; finally, the system distributes the target prescription data to the corresponding audit terminal according to the data arrangement order of the dispatching queue. Through the above steps, the matching between the prescription data to be audited and the audit terminal is realized, and the real-time distribution of the prescription data to be audited is realized based on the system architecture including the discovery center, scheduler, task center, dispatching queue, and dispatching pool. In addition, the embodiment of the present invention ensures that a piece of prescription data to be audited can only be assigned to one audit terminal by storing the identifier of the assigned prescription data in the public audit pool and excluding the data in the public audit pool from the query request of the task node for the dispatching pool. Finally, the embodiment of the present invention realizes the multi-dimensional accurate matching between the prescription data to be audited and the audit terminal through the multi-dimensional joint query of the task node for the dispatching pool, and the audit terminal can flexibly expand the screening rules of the prescription data after each online, thereby better meeting the business requirements.
[0063] The following describes the prescription distribution system according to the embodiment of the present invention. Refer to Figure 2. The prescription distribution system may include: a prescription pool, a task center, and a prescription distribution queue. The task center contains task nodes created for the audit terminals in the online state. Among them, the prescription pool receives and stores the prescription data to be audited. The task node queries the target prescription data that meets the screening conditions preset by the corresponding audit terminal from the prescription pool, and stores the identifier of the queried target prescription data into the prescription distribution queue of the audit terminal. Among them, the identifiers of the target prescription data in the same prescription distribution queue are arranged in ascending order of the prescription submission time. The task node distributes the target prescription data to the corresponding audit terminal according to the data arrangement order of the prescription distribution queue.
[0064] In an embodiment of the present invention, the system further includes: a public prescription audit pool, a discovery center, and a scheduler. Among them, before, after, or at the same time as storing the identifier of the queried target prescription data into the prescription distribution queue of the audit terminal, the task node stores the identifier of the queried target prescription data into a pre-established public prescription audit pool. And, the target prescription data indicated by the public prescription audit pool is excluded from the query request sent by the task node to the prescription pool. In response to the online instruction sent by any audit terminal, the discovery center determines the state of this audit terminal as the online state, and creates a temporary node for this audit terminal to store the characteristic data of this audit terminal, including the audit terminal identifier and the screening conditions. The scheduler creates a corresponding task node for this audit terminal in the task center according to the audit terminal identifier stored in the temporary node, and the created task node reads the screening conditions from the temporary node to execute the query of the target prescription data.
[0065] In one embodiment, in response to reaching the distribution opportunity of any audit terminal, the task node of this audit terminal determines the identifier of the target prescription data at the head of the prescription distribution queue of this audit terminal as the identifier to be distributed. Query the corresponding target prescription data in the prescription pool according to the identifier to be distributed, and distribute the queried target prescription data to this audit terminal.
[0066] Preferably, in response to the offline instruction sent by any audit terminal, the task node of this audit terminal determines the state of this audit terminal as the offline state; deletes the data in the prescription distribution queue of this audit terminal, and deletes the corresponding data of this audit terminal in the public prescription audit pool, and destroys the task node and the temporary node of this audit terminal.
[0067] In an alternative technical solution, the task node of any audit terminal monitors the heartbeat signal sent by this audit terminal; when it is determined according to the heartbeat signal that this audit terminal has an abnormality, the task node of this audit terminal deletes the data in the prescription distribution queue of this audit terminal, and deletes the corresponding data of this audit terminal in the public prescription audit pool, and destroys the task node and the temporary node of this audit terminal.
[0068] In addition, in the embodiments of the present invention, the dispensing queue is an ordered set, the identifier of the target prescription data serves as an element in the dispensing queue, and the prescription submission time of the target prescription data serves as the score of the corresponding element; the screening conditions are based on at least two of the following dimensions: prescription specialty type, prescription business type, doctor level for prescribing the prescription, prescription automatic review result, and current prescription status.
[0069] In the technical solution of the embodiments of the present invention, the prescription distribution system first receives the prescription data to be reviewed and stores the received prescription data to be reviewed in the dispensing pool; then, based on the task node created for the review terminal in the online state, queries the target prescription data that meets the screening conditions preset by the review terminal from the dispensing pool, and stores the identifier of the queried target prescription data in the dispensing queue of the review terminal, where the identifiers of the target prescription data in the same dispensing queue are arranged in ascending order according to the prescription submission time; finally, the system distributes the target prescription data to the corresponding review terminal according to the data arrangement order of the dispensing queue. Through the above steps, the matching between the prescription data to be reviewed and the review terminal is realized, and the real-time distribution of the prescription data to be reviewed is realized based on the system architecture including the discovery center, scheduler, task center, dispensing queue, and dispensing pool. In addition, the embodiments of the present invention ensure that a piece of prescription data to be reviewed can only be assigned to one review terminal by storing the identifier of the assigned prescription data in the public review pool and excluding the public review pool data in the query request of the task node for the dispensing pool. Finally, the embodiments of the present invention realize the multi-dimensional accurate matching between the prescription data to be reviewed and the review terminal through the multi-dimensional joint query of the task node for the dispensing pool, and the review terminal can flexibly expand the screening rules of the prescription data after each online, thereby better meeting the business requirements.
[0070] Figure 5 An exemplary system architecture 500 to which the prescription distribution method or prescription distribution device of the embodiments of the present invention can be applied is shown.
[0071] As Figure 5 shown, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505 (this architecture is only an example, and the components included in the specific architecture can be adjusted according to the specific situation of the invention). The network 504 is used to provide a medium for the communication link between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0072] Users can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various client applications, such as a prescription distribution application (only an example), may be installed on the terminal devices 501, 502, 503.
[0073] The terminal devices 501, 502, and 503 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, laptop computers, desktop computers, and so on.
[0074] The server 505 can be a server that provides various services, such as a background server (only for example) that supports a prescription dispensing application operated by a user using the terminal devices 501, 502, and 503. The background server can process the received prescription dispensing requests and feedback the processing results (such as prescription dispensing results - only for example) to the terminal devices 501, 502, and 503.
[0075] It should be noted that the prescription dispensing method provided by the embodiments of the present invention is generally executed by the server 505. Correspondingly, the prescription dispensing device is generally arranged in the server 505.
[0076] It should be understood that Figure 5 the numbers of the terminal devices, networks, and servers in
[0077] The present invention also provides an electronic device. The electronic device according to the embodiments of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the prescription dispensing method provided by the present invention.
[0078] Next, refer to Figure 6 , which shows a schematic structural diagram of a computer system 600 of an electronic device suitable for implementing the embodiments of the present invention. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0079] As Figure 6 shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 602 or the programs loaded from the storage section 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0080] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 606 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0081] Specifically, according to the embodiments disclosed in the present invention, the process described in the above main step diagram can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the method shown in the main step diagram. In the above embodiment, the computer program can be downloaded and installed from a network through the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit 601, the above functions defined in the system of the present invention are executed.
[0082] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, as well as the combination of blocks in a block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0084] The units involved in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes a receiving unit, a query unit, and an allocation unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the receiving unit can also be described as "the unit that provides prescription data in the prescription pool to the query unit".
[0085] As another aspect, the present invention also provides a computer-readable medium. The computer-readable medium can be included in the device described in the above embodiments; or it can exist alone without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the device, the steps performed by the device include: receiving prescription data to be audited, storing the received prescription data to be audited in a pre-established prescription pool; querying, based on a task node created for an audit terminal in an online state, target prescription data that meets the screening conditions preset by the audit terminal from the prescription pool, and storing the identifiers of the queried target prescription data in the prescription queue of the audit terminal; where the identifiers of the target prescription data in the same prescription queue are arranged in ascending order of prescription submission time; and allocating the target prescription data to the corresponding audit terminal according to the data arrangement order of the prescription queue.
[0086] In the technical solution of the embodiments of the present invention, the prescription allocation system first receives prescription data to be audited and stores the received prescription data to be audited in the prescription pool; then queries, based on a task node created for an audit terminal in an online state, target prescription data that meets the screening conditions preset by the audit terminal from the prescription pool, and stores the identifiers of the queried target prescription data in the prescription queue of the audit terminal, where the identifiers of the target prescription data in the same prescription queue are arranged in ascending order of prescription submission time; finally, the system allocates the target prescription data to the corresponding audit terminal according to the data arrangement order of the prescription queue. Through the above steps, the matching between the prescription data to be audited and the audit terminal is achieved, and the real-time allocation of the prescription data to be audited is realized based on the system architecture including a discovery center, a scheduler, a task center, a prescription queue, and a prescription pool. In addition, in the embodiments of the present invention, by storing the identifiers of the allocated prescription data in a public prescription audit pool and excluding the data in the public prescription audit pool from the query requests of the task node for the prescription pool, it is ensured that a piece of prescription data to be audited can only be allocated to one audit terminal. Finally, in the embodiments of the present invention, the multi-dimensional joint query of the prescription pool by the task node realizes the multi-dimensional accurate matching between the prescription data to be audited and the audit terminal, and the audit terminal can flexibly expand the screening rules of the prescription data after each online operation, thereby better meeting the business requirements.
[0087] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A prescription dispensing method, characterized in that, Including: Receiving the prescription data to be audited, and storing the received prescription data to be audited in a pre-established prescription distribution pool; Querying, from the prescription distribution pool, target prescription data that meets the screening conditions preset by the audit terminal based on the task node created for the audit terminal in the online state, and storing the identifiers of the queried target prescription data in the prescription distribution queue of the audit terminal; wherein, the identifiers of the target prescription data in the same prescription distribution queue are arranged in ascending order of the prescription submission time; Allocating the target prescription data to the corresponding audit terminal according to the data arrangement order of the prescription distribution queue.
2. The method according to claim 1, characterized in that, The method further includes: Before, after or at the same time as storing the identifiers of the queried target prescription data in the prescription distribution queue of the audit terminal, storing the identifiers of the queried target prescription data in a pre-established common prescription audit pool; and Excluding the target prescription data indicated by the common prescription audit pool from the query request sent by the task node to the prescription distribution pool.
3. The method according to claim 1, wherein The allocating the target prescription data to the corresponding audit terminal according to the data arrangement order of the prescription distribution queue includes: In response to reaching the allocation opportunity of any audit terminal, determining the identifier of the target prescription data at the head of the queue in the prescription distribution queue of this audit terminal as the identifier to be allocated; Querying the corresponding target prescription data in the prescription distribution pool according to the identifier to be allocated, and allocating the queried target prescription data to this audit terminal.
4. The method according to claim 2, characterized in that, The method further includes: In response to an online instruction sent by any audit terminal, determining the state of this audit terminal as the online state, and creating a temporary node for this audit terminal to store the characteristic data of this audit terminal, including the audit terminal identifier and the screening conditions; Creating a corresponding task node for this audit terminal according to the audit terminal identifier stored in the temporary node, and reading the screening conditions from the temporary node based on the created task node to execute the query of the target prescription data.
5. The method according to claim 4, wherein The method further includes: In response to a offline instruction sent by any audit terminal, determining the state of this audit terminal as the offline state; Deleting the data in the prescription distribution queue of this audit terminal and deleting the corresponding data of this audit terminal in the common prescription audit pool based on the task node of this audit terminal, and destroying the task node and the temporary node of this audit terminal.
6. The method according to claim 4, wherein The method further includes: Monitoring the heartbeat signal sent by any audit terminal based on the task node of this audit terminal; When it is judged according to the heartbeat signal that this audit terminal has an abnormality, deleting the data in the prescription distribution queue of this audit terminal and deleting the corresponding data of this audit terminal in the common prescription audit pool based on the task node of this audit terminal, and destroying the task node and the temporary node of this audit terminal.
7. The method according to claim 1, characterized in that, The prescription distribution queue is an ordered set, the identifier of the target prescription data is used as an element in the prescription distribution queue, and the prescription submission time of the target prescription data is used as the score of the corresponding element; The screening conditions are based on at least two of the following dimensions: prescription specialty type, prescription business type, doctor level of prescribing the prescription, prescription automatic audit result, current state of the prescription.
8. A prescription dispensing device, characterized in that, Including: A receiving unit, configured to receive the prescription data to be audited, and store the received prescription data to be audited in a pre-established prescription distribution pool; A query unit, configured to query, from the prescription dispatching pool, target prescription data that meets the filtering conditions preset by the auditing terminal based on the task node created for the auditing terminal in the online state, and store the identifiers of the queried target prescription data into the prescription dispatching queue of the auditing terminal; wherein, the identifiers of the target prescription data in the same prescription dispatching queue are arranged in ascending order of prescription submission time; An allocation unit, configured to allocate the target prescription data to the corresponding auditing terminal according to the data arrangement order of the prescription dispatching queue.
9. A prescription dispensing system, characterized in that, Including: A prescription dispatching pool, a task center, and a prescription dispatching queue, where the task center contains task nodes created for the auditing terminals in the online state; wherein, The prescription dispatching pool receives and stores the prescription data to be audited; The task node queries, from the prescription dispatching pool, target prescription data that meets the filtering conditions preset by the corresponding auditing terminal, and stores the identifiers of the queried target prescription data into the prescription dispatching queue of the auditing terminal; wherein, the identifiers of the target prescription data in the same prescription dispatching queue are arranged in ascending order of prescription submission time; The task node allocates the target prescription data to the corresponding auditing terminal according to the data arrangement order of the prescription dispatching queue.
10. The system according to claim 9, characterized in that, The system further includes: a public prescription auditing pool, a discovery center, and a scheduler; wherein, Before, after, or at the same time as storing the identifiers of the queried target prescription data into the prescription dispatching queue of the auditing terminal, the task node stores the identifiers of the queried target prescription data into a pre-established public prescription auditing pool; and, the target prescription data indicated by the public prescription auditing pool is excluded from the query request sent by the task node to the prescription dispatching pool; In response to an online instruction sent by any auditing terminal, the discovery center determines the status of the auditing terminal as the online state, and creates a temporary node for the auditing terminal to store the feature data of the auditing terminal, including the auditing terminal identifier and the filtering conditions; The scheduler creates a corresponding task node for the auditing terminal in the task center according to the auditing terminal identifier stored in the temporary node, and the created task node reads the filtering conditions from the temporary node to execute the query of the target prescription data.
11. An electronic device, characterized in that, Including: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program, when executed by the processor, implements the method according to any one of claims 1-7.