Online medicine dispensing method, system and storage medium based on reasonable medicine prescription
By matching patients with nearby online pharmacies through the cloud pharmacy system, generating medication purchase plans, and delivering them to electronic medicine boxes, the system solves the problem of patients being unable to purchase and receive medication online due to inconvenience, and realizes convenient, fast, and economical drug delivery and centralized storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU WEIYAO INFORMATION TECH CO LTD
- Filing Date
- 2023-09-18
- Publication Date
- 2026-06-26
AI Technical Summary
In the current technology, it is inconvenient for patients to purchase and receive medicines online in an economical and reasonable manner based on their prescriptions, especially due to issues such as priority recommendations for nearby locations and centralized drug extraction. This results in problems such as decentralized drug delivery, impact on timeliness, and waste of resources.
Patients input their identity and address information on their electronic devices, scan the name of the prescription drug, and the cloud pharmacy server matches nearby online pharmacies, recommending suitable purchase options based on distance and price. After generating an information code and making payment, the online pharmacy delivers the medication to an electronic medicine box, where the medication is stored in separate compartments for easy access by the patient.
It enables patients to purchase medicines nearby with a patient-centered approach, offering fast and economical delivery, centralized storage and retrieval of medicines, and is especially suitable for the elderly and children, thus improving the efficiency and convenience of purchasing medicines.
Smart Images

Figure CN122290916A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online prescription drug purchase and delivery, and particularly to a method, system, and storage medium for online prescription drug purchase and delivery based on rational drug use. Background Technology
[0002] Chinese Patent Publication No.: CN115983938A, Patent Title: Method and Apparatus for Online Drug Purchase Management, Technical Field: Internet Medical Technology, Technical Problem Solved: This invention aims to automatically generate a list of goods to be purchased based on drug prescriptions, simplifying online drug purchase steps and processes, and improving online drug purchase efficiency. The main technical solution adopted is as follows: Parsing the drug prescription from the online drug purchase request and identifying the drug text in the prescription; matching the drug text with drugs in a pre-built drug database, and selecting the successfully matched drugs as target drugs; matching the target drugs with products in a pre-built database of available products, and selecting the successfully matched products as target products; generating a list of goods to be purchased based on the target products corresponding to each target drug. This implementation can automatically generate a list of goods to be purchased based on drug prescriptions, simplifying online drug purchase steps and processes, and improving online drug purchase efficiency. However, it has the following technical defects: First, it is inconvenient to recommend online medication purchase plans based on the distance of the patient's address, as well as the delivery of medications after online purchase. If the price difference is not significant, long-distance delivery of medications to other places will affect the timeliness and waste express delivery resources. Second, the prerequisite for purchasing medicine is a reasonable prescription issued by a doctor. However, due to factors such as price and manufacturer, the medicines on the prescription cannot be purchased separately from multiple online pharmacies, which is not conducive to patients' choices. It is necessary to split the prescription medicines and match them online. Through the recommended splitting plan, the medicines of the same prescription can be purchased from different online pharmacies and delivered to the patient separately. Third, the delivered medicines are inconvenient for patients to take, especially the elderly and children. When multiple medicines are involved, patients need to repeatedly take them out. Special medicines need to be mixed, so patients need to wait for all the medicines to be available before they can use them. This method is very disadvantageous to patients. Summary of the Invention
[0003] The purpose of this invention is to provide a method, system, and storage medium for online drug purchase and delivery based on a rational drug prescription, which solves the problem in the prior art that patients cannot conveniently and economically purchase and receive drugs online based on a rational drug prescription, especially the problem of prioritizing nearby recommendations and delivery, and centralized drug retrieval. The technical effect is: more convenient online drug purchase based on the patient-centered principle of proximity, faster delivery, more economical and reasonable, and the drugs are delivered to the electronic prescription box at the patient's address.
[0004] To achieve the above objectives, the present invention adopts the following technical solution: The online drug purchase and delivery method based on rational drug use prescriptions is characterized by the following steps: S1: The patient enters their identity and address information on an electronic device; S2: The patient scans and identifies the prescription requiring a second dispensing on the electronic device, extracting the drug names from the prescription; S3: The electronic device connects to the cloud pharmacy's server, and the cloud pharmacy matches the extracted drug names with online pharmacies near the patient's address; S4: The cloud pharmacy recommends a plan to the patient based on the distance between the online pharmacy address and the patient's address, and the price of the drug; S5: The patient selects the recommended plan on the electronic device, makes payment, and generates an information code; S6: The cloud pharmacy transfers the payment to the online pharmacy included in the drug purchase plan; S7: The online pharmacy delivers the purchased drugs to the patient's address offline.
[0005] Preferably, step S5 also includes: a patient's electronic device terminal code and an offline delivery terminal code; step S7 further includes: setting up an electronic medicine box at the patient's residence, the electronic medicine box being connected to the patient's electronic device via network, the electronic medicine box being connected to an offline delivery terminal, the electronic medicine box having a medicine compartment, each online pharmacy delivering purchased medicines offline to the compartment of the electronic medicine box, and the offline delivery terminal opening the electronic medicine box using the offline delivery terminal code.
[0006] Preferably, step S5 further includes: after the patient pays through the electronic device, the patient's electronic device terminal code is automatically sent to the electronic medicine box; step S7 further includes: the medicine delivered from the online pharmacy to the offline delivery of the electronic medicine box to a partition, wherein the electronic medicine box identifies the patient's electronic device terminal code by pairing it with the offline delivery terminal code, and sends a prompt message to the patient's electronic device.
[0007] Preferably, the system includes: a patient's electronic device, a cloud pharmacy server, an online pharmacy terminal, an offline delivery terminal, and an electronic medicine box terminal. The cloud pharmacy server is connected to the patient's electronic device, the cloud pharmacy server, the online pharmacy terminal, the offline delivery terminal, and the electronic medicine box terminal. The patient's electronic device includes: a scanning and recognition module, an address information positioning module, a plan selection module, an order placement module, and an information code generation module. The online pharmacy terminal includes: a drug information matching module. The scanning and recognition module is used to scan and recognize paper prescriptions or electronic prescriptions, extract the drug names from the prescriptions, and send them to the cloud pharmacy server. The address information positioning module is used to enter the patient's address information and send the address positioning information to the cloud pharmacy server. The cloud pharmacy server is used to... The system matches product names with nearby online pharmacies centered around the patient's address, generates a purchase plan, and sends it to the patient's electronic device. The plan selection module receives the purchase plan information and allows the patient to choose a plan with suitable price and distance. The ordering module allows the patient to make payment after selecting a purchase plan. The information code generation module generates an electronic device code that is automatically sent to the electronic medicine box via the patient's electronic device. The offline delivery terminal is used by the delivery person and receives the offline delivery terminal code sent by the cloud pharmacy server. The electronic medicine box connects to the offline delivery terminal displaying the offline delivery terminal code, which is used to identify the delivery person. After identification, the electronic medicine box automatically opens, and the delivery person places the medicine into the designated compartment.
[0008] Preferably, the electronic medicine box is used to send a medication pickup reminder to the patient's electronic device after the generated electronic device terminal code information is matched with all offline delivery terminal codes, and the electronic medicine box is placed at the patient's residence.
[0009] Preferably, the cloud pharmacy server is also used to match the extracted drug names with online pharmacies, and generate a scheme that includes one or more drugs that conform to the prescription drug catalog, based on the distance between the online pharmacy and the patient's address and the price of the drug.
[0010] Preferably, the online pharmacy sends the order information to the offline delivery terminal via the cloud pharmacy server, and the offline delivery terminal accepts the order and makes the delivery; the patient pays the fee to the cloud pharmacy via an electronic device, and the cloud pharmacy distributes the fee to the various online pharmacies within the medication purchase plan.
[0011] An electronic medicine box includes a box body with more than one medicine-separating compartment. An electric door is located at the bottom of the box body, and the closed electric door forms the bottom of the medicine-separating compartments. A cavity is located below the electric door, and a medicine rack is located at the bottom of the cavity. An identification camera and an information display screen are located on the outer wall of the box body. Each medicine-separating compartment is equipped with a monitoring head. The delivery person scans the offline delivery terminal code using the identification camera and displays it on the information display screen. The delivery person opens the box cover at the top and places the medicine into the medicine-separating compartment. The monitoring head detects that the medicine has been placed. After all offline delivery terminal codes have been scanned and all medicines are placed in the medicine-separating compartments, the electronic device's terminal code information matches all offline delivery terminal codes. A medication retrieval prompt is sent to the patient's electronic device. The patient opens the electric door via their electronic device, and all medicines fall into the medicine rack. The patient then retrieves all the medicines from the rack.
[0012] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of any one of claims 1 to 3.
[0013] A storage medium storing a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 3.
[0014] Beneficial effects: The present invention differs from the prior art in that: I. This invention enables patients to purchase medications based on their prescriptions. In particular, it uses the patient's address as the center to match online pharmacies in the patient's location, creating a reasonable medication purchase plan based on the patient's location. The medications for one prescription can be purchased from different online pharmacies, with the best option selected based on factors such as distance and price. This facilitates fast and efficient delivery to the patient's home, making it economical, reasonable, and convenient.
[0015] Second, electronic medicine boxes are set up at the patient's residence. The delivery personnel place the medicines delivered offline directly into the electronic medicine box. Since the medicines on the same prescription may be purchased from different online pharmacies, each online pharmacy needs to deliver the medicines offline to the electronic medicine box at the patient's residence, which further facilitates the patient's access to the medicines. It is especially suitable for the elderly, children and people with mobility difficulties. It is simple, convenient, fast and efficient. Attached Figure Description
[0016] Figure 1 : A flowchart illustrating the process of purchasing prescription drugs online for rational drug use; Figure 2 A diagram illustrating the distance between online pharmacies and patients' addresses; Figure 3: An illustration of how online pharmacies select medication purchase options based on patient prescriptions; Figure 4 : A diagram illustrating the offline delivery process after purchasing medicine; Figure 5 : A diagram illustrating the allocation of costs for online drug purchases; Figure 6 Schematic diagram of the electronic medicine box structure; Figure 7 : Schematic diagram of the opening structure of the electronic medicine box; Figure 8 Top view of the electronic medicine box after it has been opened; Attached reference numerals: 1. Medicine box body; 2. Medicine box cover; 3. Identification camera; 4. Side ear box; 5. Electric door; 6. Vertical connecting rod; 8, 9. Medicine differentiation chamber; 10, 11, 12. Information display screen; 13, 14. Patient from medicine box; 15. Monitoring head. Implementation
[0017] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Embodiments of the present invention will be described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of the present invention means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0018] Example 1: As Figure 1 and 2The following describes an online medication purchase and delivery method based on rational drug use prescriptions, including the following steps: S1: The patient inputs their identity and address information on an electronic device, such as a smartphone or tablet. This allows the patient to purchase medication online. S2: The patient scans and identifies the prescription requiring a second dispensing on the electronic device, extracting the drug names. This is primarily achieved through OCR and natural language processing technologies. Extracting the drug names facilitates further drug selection. S3: The electronic device connects to the cloud pharmacy's server. The connection method involves installing a cloud pharmacy client application on the electronic device and connecting via the network. The API (Application Programming Interface) is further configured, allowing the cloud pharmacy's cloud server to provide a set of APIs for the client application. The APIs allow the cloud pharmacy client application to communicate and interact with the cloud server. The cloud pharmacy matches the extracted drug names with available online pharmacy medications in the patient's address location. Geolocation technology is used... The system employs technologies such as GPS or IP address positioning to determine the patient's precise location coordinates; a database management system stores relevant data about the online pharmacy, including pharmacy locations, inventory information, and prices; GIS technology is used to perform spatial analysis of pharmacy locations around the patient's address to identify nearby pharmacies; after identifying nearby pharmacies, distance algorithms (such as Euclidean distance or Haversine formula) are used to calculate the distance between the patient and each pharmacy; one or more pharmacies meeting the distance requirements are retrieved from the stored pharmacy data; simultaneously, based on the prescription's drug information and the pharmacy's inventory data, single or multiple prescription drugs are matched with the pharmacy's inventory; S4: The cloud pharmacy recommends options to the patient based on the distance between the online pharmacy address and the patient's address, and the drug price; recommendation algorithms (such as collaborative filtering or content-based recommendation algorithms) are used to sort and filter the purchase options to provide the most suitable purchase option for the patient; communication and data exchange between the client application and the cloud server are achieved through API (Application Programming Interface).
[0019] like Figure 2As shown, in step S5: The patient selects the recommended treatment plan on their electronic device, makes payment, and generates an information code. After the patient selects the treatment plan, the client application adds the purchased medication to the shopping cart or generates an order. The order information includes the selected medication, quantity, and related costs. The client application integrates with the payment interface to enable online payment. The payment interface provides a secure payment channel, allowing users to complete the payment process using their mobile phones. The payment interface returns a payment result callback to the cloud pharmacy's cloud server. Upon receiving the payment result, the cloud server verifies it and updates the order status to "paid." The client application displays a payment success message to the user, and the order status is updated to "paid." The cloud server generates a corresponding information code based on the order information. This information code serves as proof of medication collection for the patient. The client application displays the generated information code to the user, typically in the form of a QR code. The user can screenshot or save the information code for later use in the medication collection process. like Figure 3 , 5 As shown, in step S6: The cloud pharmacy pays the funds to the online pharmacies within the drug purchase plan, integrating payment interfaces and payment gateways, enabling users to make online payments using mobile applications. After the user completes the payment operation on their mobile phone, the payment interface returns the payment result to the cloud pharmacy's cloud server. A financial management system is established on the cloud pharmacy's cloud server to manage the payment and fee distribution process. The financial management system records the user's payment information and the fees paid to the online pharmacies. The cloud pharmacy's cloud server receives the payment result returned by the payment interface and verifies it. The server verifies the legality and accuracy of the payment to ensure that the user has successfully paid. Once the payment result is verified, the cloud pharmacy's cloud server distributes the corresponding fees to the online pharmacies involved in the drug purchase plan. This can be achieved through partner settlement or bank wire transfer. The financial management system records relevant information for each payment, including payment time, payment amount, online pharmacy, etc., and also provides corresponding reporting functions for statistical and management of payment data. like Figure 4As shown, in step S7: The online pharmacy delivers the purchased medications to the patient's address offline. The cloud pharmacy's cloud server generates relevant order information, including the patient's address and medication details, and establishes a delivery management system to manage the order delivery process. This system can record order delivery information, delivery personnel information, delivery time, etc. Using geolocation technology or map interfaces, the patient's address is converted into geographic coordinates and matched with the delivery personnel's location to determine the optimal delivery route to improve delivery efficiency. Based on factors such as order information, delivery personnel's location, and delivery range, the delivery management system can intelligently schedule and allocate tasks, assigning suitable delivery personnel to corresponding orders to ensure timely and efficient delivery of medications to the patient's address. Through the delivery management system, the delivery personnel's location and delivery progress can be tracked in real time. Simultaneously, notifications can be sent to the patient or a tracking link can be provided to inform the patient of the order's delivery status and estimated delivery time. After the delivery personnel deliver the medication to the patient's address, the cloud pharmacy's cloud server updates the order status to "delivered" and generates relevant delivery records.
[0020] like Figure 1 As shown, the information code in step S5 also includes: a patient electronic device terminal code and an offline delivery terminal code. After the patient pays through the electronic device, the patient electronic device terminal code is automatically sent to the electronic medicine box, and the offline delivery terminal code is sent to the cloud pharmacy cloud server. The patient electronic device terminal code and the offline delivery terminal code are used in pairs.
[0021] like Figure 1 , 4 As shown, step S7 further includes: setting up an electronic medicine box at the patient's residence, which can communicate with the cloud server and the patient's electronic device. The electronic medicine box has its own unique identification code. The cloud pharmacy's cloud server supplements the offline delivery terminal code based on the order and delivery information and sends it to the delivery person's delivery device. Simultaneously, the cloud server has the function of pairing the patient's electronic device terminal code with the electronic medicine box's identification code to achieve binding with the electronic medicine box. The electronic medicine box is connected to the offline delivery terminal network. The electronic medicine box has a medicine compartment. Each online pharmacy delivers purchased medicines offline to the electronic medicine box's compartment. The offline delivery terminal opens the electronic medicine box using the offline delivery terminal code, and the medicines delivered offline by the online pharmacy are delivered to the electronic medicine box's compartment. The electronic medicine box identifies and pairs the patient's electronic device terminal code with the offline delivery terminal code, and sends a prompt message to the patient's electronic device.
[0022] Example 2: As Figure 1-5The system, based on a rational drug use prescription online purchase and delivery system, includes: a patient electronic device, a cloud pharmacy server, an online pharmacy terminal, an offline delivery terminal, and an electronic medicine box terminal. The cloud pharmacy server is connected to the patient electronic device, cloud pharmacy server, online pharmacy terminal, offline delivery terminal, and electronic medicine box terminal via a network connection. The patient electronic device has a client application that includes: a scanning and recognition module, an address information positioning module, a plan selection module, an order placement module, and an information code generation module. The online pharmacy terminal includes: a drug information matching module. The scanning and recognition module is used to scan and recognize paper or electronic prescriptions, extract the drug names from the prescriptions, and send them to the cloud pharmacy server. The address information positioning module is used to input the patient's address information and send the address positioning information to the cloud pharmacy server. The cloud pharmacy server is used to match the drug names with drugs from nearby online pharmacies centered on the patient's address, generate a purchase plan, and send it to the patient's electronic device. For example, the implementation method is: # Get patient address coordinates patientAddress = getLocation(patientAddress) # Nearby pharmacy search algorithm pharmacies = searchPharmacies(patientAddress, radius) def searchPharmacies(patientAddress, radius): # Query the list of nearby pharmacies pharmacies = [] # Call the geographic information system or third-party map interface to query the information of nearby pharmacies based on the patient's address and search radius return pharmacies; Drug name matching algorithm: matchedDrugs= matchDrugs(drugName, pharmacies) def matchDrugs(drugName, pharmacies): matchedDrugs = [] # Traverse the drug database or call a third-party API to match drug names with drugs in online pharmacies for pharmacy in pharmacies: drugList = pharmacy.getDrugList() fordrug in drugList: if match(drug, drugName): matchedDrugs.append(drug) return matchedDrugs def match(drug, drugName): # Implement drug name matching logic, such as using a string matching algorithm or similarity algorithm # Return True if a match is successful; otherwise, return False return True or False; # Send the medication purchase plan to the patient's electronic device sendPrescriptionToDevice(prescription, patientDevice) def sendPrescriptionToDevice(prescription, device): # Build a data structure or use a suitable data transmission protocol (such as HTTP) to send the medication purchase plan to the patient's electronic device data = formatData(prescription) send(data, device)...
[0023] The plan selection module is used to receive medication purchase plan information and facilitate patients to select a plan with suitable price and distance through the plan selection module; the ordering module is used for patients to make payment after selecting a medication purchase plan; the information code generation module is used to generate an electronic device terminal code and automatically send it to the electronic medicine box through the patient's electronic device; the offline delivery terminal is used by the delivery person and receives the offline delivery terminal code sent by the cloud pharmacy server; the electronic medicine box terminal is connected to the offline delivery terminal code displayed on the delivery person's offline delivery terminal. After recognition, the electronic medicine box terminal automatically opens, and the delivery person puts the medicine into the partition of the electronic medicine box terminal. For example: Plan selection: # Receive medication purchase plan information and return the plan selection to the patient def receivePrescription(prescription): # Extract relevant information such as price and distance based on the input medication purchase plan information price = prescription.getPrice() distance =prescription.getDistance() # Display the price, distance, and other information to the patient and get the medication purchase plan selectedPrescription = selectPrescription(price, distance) return selectedPrescription def selectPrescription(price, distance): # Provides a user interface for patients to easily select a suitable medication purchase plan based on price and distance. # Generates the selected medication purchase plan based on the patient's choice. # Returns the selected medication purchase plan. Ordering method: # The patient selects a medication purchase plan and makes payment. def placeOrder(selectedPrescription): # Generates order information based on the patient's selected medication purchase plan. order = generateOrder(selectedPrescription) # Calls the payment interface to perform the payment operation. paymentResult = makePayment(order) return paymentResult. def generateOrder(selectedPrescription): # Generates order information based on the selected medication purchase plan and the patient's personal information. # Returns the order information. def makePayment(order): # Calls the corresponding payment interface to process the patient's payment operation. # Returns the payment result.Information Code Generation: # Generate electronic device terminal code and automatically send it to the electronic medicine box def generateDeviceCode(): # Generate electronic device terminal code deviceCode = generateCode() # Automatically send the electronic device terminal code to the electronic medicine box sendToDeviceBox(deviceCode) def generateCode(): # Use a suitable encoding algorithm or library to generate a unique device terminal code return deviceCode def sendToDeviceBox(deviceCode): # Send the device terminal code to the electronic medicine box using a network connection or other suitable method send(deviceCode, electronicBox); # Receive the offline delivery terminal code sent by the cloud pharmacy server def receiveDeliveryCode(deliveryCode): # Receive the offline delivery terminal code sent by the cloud pharmacy server in the offline delivery terminal # Scan the offline delivery terminal code and verify it # Perform the delivery operation and deliver the medicine to the patient's address according to the delivery information deliverMedicine() def deliverMedicine(): # Implement the specific delivery operation # Deliver the medicine to the patient's address # At the same time, carry the offline delivery terminal code return; The electronic medicine box identifies the delivery person's offline delivery code. `def recognizeizeDeliveryCode(deliveryCode):` # Identifies the delivery person's offline delivery code and verifies its validity. `verifyCode(deliveryCode):` # If the offline delivery code verification is successful, automatically open the electronic medicine box. `openElectronicBox():` `def verifyCode(deliveryCode):` # Verifies the delivery code to ensure its validity and effectiveness. # Returns True if verification is successful, otherwise returns False. `return True or False` `def openElectronicBox():` # Automatically opens the electronic medicine box so the delivery person can put the medicine in.
[0024] Preferably, the electronic medicine box terminal is used to send a medication pickup notification to the patient's electronic device after matching the generated electronic device terminal code information with all offline delivery terminal codes. For example: Patient's electronic device terminal: # Receive medication pickup notification def receivePickupNotification(notification): # Parse medication pickup notification information processPickupNotification(notification) def processPickupNotification(notification): # Display medication pickup notification information to the patient displayNotification(notification) Cloud pharmacy cloud server: # Generate electronic device terminal code def generateDeviceCode(): # Use a suitable encoding algorithm or library to generate a unique device terminal code deviceCode = generateCode() # Send the device terminal code to the offline delivery terminal for matching sendToDevice(deviceCode) def generateCode(): # Implement the algorithm for generating the device terminal code or call a suitable library return deviceCode # Match with offline delivery terminal codes def matchDeliveryCode(deviceCode, deliveryCodes): for code in deliveryCodes: if code == deviceCode: return True return False # Send a medication pickup notification: defsendPickupNotification(patientDevice, notification): # Send a medication pickup notification to the patient's electronic device using an appropriate method. sendToPatient(patientDevice, notification);Offline Delivery Terminal: # Generate offline delivery terminal code def generateDeliveryCode(): # Generate a unique offline delivery terminal code using a suitable encoding algorithm or library deliveryCode = generateCode() return deliveryCode # Send the offline delivery terminal code to the cloud pharmacy server for matching def sendToDevice(deviceCode): # Send the offline delivery terminal code to the cloud pharmacy server for matching sendToServer(deviceCode) def sendToServer(deviceCode): # Send the offline delivery terminal code to the cloud pharmacy server for matching using a network connection or other suitable method send(deviceCode, server) # Receive the medication pickup notification and send the result to the electronic medicine box def receivePickupNotification(notification): # Parse the medication pickup notification processPickupNotification(notification) # Send the result to the electronic medicine box sendToElectronicBox(notification) def processPickupNotification(notification): # Process the medication pickup notification processNotification(notification) def processNotification(notification): # Implement specific processing logic, such as verifying validity or operating the electronic medicine box according to patient needs. `return def sendToElectronicBox(notification): # Send the result to the electronic medicine box using an appropriate method, such as via wireless network connection or other communication methods. send(notification, electronicBox), the electronic medicine box is located at the patient's residence for convenient medication access.`
[0025] Preferably, the cloud pharmacy server is also used to match the extracted drug names with online pharmacies, and based on the patient address distance and drug price, generate a scheme that matches the prescription drug catalog with one or more drugs. For example: # Drug name matching algorithm def matchDrugs(drugName, pharmacies): matchedDrugs= [] # Traverse the drug database or call a third-party API to match drug names with drugs in online pharmacies for pharmacy in pharmacies: drugList = pharmacy.getDrugList() for drug indrugList: if match(drug, drugName): matchedDrugs.append(drug) return matchedDrugs def match(drug, drugName): # Implement drug name matching logic, such as using a string matching algorithm or similarity algorithm # If the match is successful, return True; otherwise, return False return True or False # Filter online pharmacies based on patient address and distance def filterByDistance(patientAddress, pharmacies, maxDistance): filteredPharmacies = [] patientLocation =getLocation(patientAddress) for pharmacy in pharmacies: pharmacyLocation =getLocation(pharmacy.getAddress()) distance = calculateDistance(patientLocation, pharmacyLocation) if distance <= maxDistance:filteredPharmacies.append(pharmacy) return filteredPharmacies def getLocation(address): # Call a geographic information system or third-party map interface to get coordinate information based on the address returnlocation def calculateDistance(location1, location2): # Calculate the distance between two locations based on the coordinate information return distance # Filter by drug price def filterByPrice(drugs, maxPrice): filteredDrugs = [] for drug in drugs: price =drug.getPrice() if price <= maxPrice: filteredDrugs.append(drug) return filteredDrugs # Generate prescription plans with at least one matching drug in the prescription drug list def generatePrescription(patientAddress, drugName, maxDistance, maxPrice): # Query online pharmacy information, such as from a database or by calling a third-party API pharmacies = searchPharmacies() # Match drug names matchedDrugs = matchDrugs(drugName, pharmacies) # Filter online pharmacies by patient address and distance filteredPharmacies = filterByDistance(patientAddress, pharmacies, maxDistance) # Filter online pharmacies by drug price filteredDrugs = filterByPrice(matchedDrugs, maxPrice) # Generate prescription plans prescription = generatePrescriptionFromFiltered(filteredPharmacies, filteredDrugs) return prescription def searchPharmacies(): # Query online pharmacy information, such as from a database or by calling a third-party API pharmacies = [] return pharmacies def generatePrescriptionFromFiltered(pharmacies, drugs): # Generate a purchase plan based on the filtered online pharmacies and drugs. `prescription = Prescription()` # Add pharmacy and drug information to the purchase plan according to specific needs. `return prescription`.
[0026] Preferably, the online pharmacy sends the order information to the offline delivery terminal via the cloud pharmacy server, and the offline delivery terminal accepts and delivers the order. The patient pays the fee to the cloud pharmacy via an electronic device, and the cloud pharmacy distributes the payment to various online pharmacies within the medication purchase plan. For example, the online pharmacy implementation is as follows: # Send the order information to the cloud pharmacy server def placeOrderToServer(order): # Call the appropriate method to send the order information to the cloud pharmacy server sendToServer(order) # Receive the delivery task sent by the cloud pharmacy server def receiveDeliveryTask(task): # Parse the delivery task information processDeliveryTask(task) # Perform the order acceptance and delivery operation acceptAndDeliver() def processDeliveryTask(task): # Implement the parsing logic of the delivery task information return def acceptAndDeliver(): # Implement the specific order acceptance and delivery operation return, # Receive the order information sent by the online pharmacy def receiveOrderFromPharmacy(order): # Process the order information sent by the online pharmacy processOrder(order) def processOrder(order): # Process the order information, such as generating delivery task information and sending it to the offline delivery terminal. deliveryTask = generateDeliveryTask(order) sendToDeliveryAgent(deliveryTask) # Distribute payments to the various online pharmacies within the medication purchase plan. def distributePayment(prescription): for pharmacy inprescription.getPharmacies(): payment = calculatePayment(prescription, pharmacy) payToPharmacy(payment) def calculatePayment(prescription, pharmacy): # Calculate the amount due based on the medication purchase plan and relevant information from the online pharmacies. payment = ...return payment def payToPharmacy(payment): # Implements the method to pay the online pharmacy, using network payment interfaces, etc. pay(payment, pharmacy), offline delivery end # Receives delivery tasks sent by the cloud pharmacy server def receiveDeliveryTask(task): # Parses delivery task information processDeliveryTask(task) # Performs order acceptance and delivery operations acceptAndDeliver() def processDeliveryTask(task): # Implements the parsing logic for delivery task information return def acceptAndDeliver(): # Implements the specific order acceptance and delivery operations return; patient's electronic device # Pays the fee to the cloud pharmacy def payToPharmacy(cost): # Calls the appropriate payment method to pay the fee to the cloud pharmacy paymentResult = makePayment(cost) def makePayment(cost): # Implements the payment operation, such as calling the network payment interface to make payment paymentResult = ... return paymentResult.
[0027] Example 3: As Figure 6-8An electronic medicine box, as shown, includes a medicine box body 1 for storing medicines delivered by offline delivery personnel. The medicine box body 1 has more than one medicine-separating compartment 8, facilitating the placement of multiple medicines or multiple delivery personnel. An electric door 5 is located at the bottom of the medicine box body 1. The electric doors 5 are symmetrically arranged and opened or closed by a motor to facilitate patient access to medication. When the electric door 5 is opened, the medicine falls out from the bottom of the medicine box body 1, further facilitating patient access. The closed electric door 5 is located at the bottom of the medicine-separating compartment 8, with a cavity extending downwards to allow medicines to fall. A medicine frame 13, a hollow cuboid shape, is located at the bottom of the cavity, allowing medicines to fall into the frame for easy and convenient retrieval by the patient. The outer wall of the medicine box body 1 is equipped with a recognition camera 3 and an information display screen 10. The recognition camera 3 scans and identifies the delivery personnel's offline delivery code. To facilitate delivery personnel opening the medicine box lid 2, each medicine compartment 8 is equipped with a monitoring head 15. This head monitors whether medicine is already placed in the compartment 8 and displays the remaining number of compartments. The delivery personnel scan the offline delivery terminal code using the identification camera 3, which is then displayed on the information display screen 10, showing the delivery order number and medicine information. This allows the electronic medicine box to verify itself. After opening the medicine box lid 2 on the top of the medicine box 1, the delivery personnel place the medicine into the medicine compartment 8, and the monitoring head 15 confirms that the medicine has been placed. Once all offline delivery terminal codes have been scanned and all medicines are placed in the medicine compartment 8, the electronic device's terminal code information matches all offline delivery terminal codes, sending a medication retrieval prompt to the patient's electronic device. The patient then uses their electronic device to open the electric door 5, allowing all medicines to fall into the medicine rack 13. The patient retrieves all medicines from the medicine rack 13. This system is particularly suitable for the elderly, children, and patients with mobility issues. Example 4: System operation also includes: memory and processor, which together constitute the main components of a computer system; Memory: Memory is where data and instructions are stored in a computer. It includes main memory (such as RAM) and auxiliary memory (such as hard disks or solid-state drives), used to store programs and data, mainly for running online drug delivery; A computer program is a set of online drug delivery instructions written in a specific order, used to tell the computer how to execute. The program is stored in a storage medium and loaded into memory for the processor to execute when needed; Processor: The processor is the core component of the computer, namely the central processing unit (CPU). It executes the instructions in the medication recommendation system program and performs calculations and processing on the data; Storage medium: Storage medium is the physical medium used for long-term storage of programs and data, such as hard disk drives, solid-state drives, optical disks, and flash drives. Storage media provides non-volatile storage, enabling the computer to restart after a power outage, and large-capacity storage media can be used for persistent data storage, facilitating the protection of related usage data.
[0028] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The above descriptions are merely specific implementations of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0029] This invention is not limited to the specific embodiments described above. All changes that do not depart from the structure and function of this solution are within the scope of protection of this invention.
Claims
1. A method for online drug purchase and delivery based on rational drug use prescriptions, characterized by: The steps include: S1: The patient enters their identity and address information on the electronic device; S2: The patient scans and identifies the prescription for a second dispensing on the electronic device and extracts the names of the medications in the prescription; S3: The electronic device connects to the cloud pharmacy's server, and the cloud pharmacy matches the extracted medication names with the medications available at online pharmacies in the patient's address area. S4: The cloud pharmacy recommends plans to patients based on the distance between the online pharmacy address and the patient's address, as well as the price of the medicine; S5: The patient selects the recommended plan on the electronic device, makes payment, and generates an information code; S6: The cloud pharmacy will pay the amount to the online pharmacy included in the medication purchase plan; S7: Online pharmacies deliver purchased medicines to patients' addresses offline.
2. The online drug purchase and delivery method based on rational drug use prescriptions according to claim 1, characterized in that: Step S5 also includes: patient electronic device terminal code and offline delivery terminal code; Step S7 also includes: an electronic medicine box is set up at the patient's residence, the electronic medicine box is connected to the patient's electronic device network, the electronic medicine box is connected to the offline delivery terminal, the electronic medicine box is set up with a medicine compartment, each online pharmacy delivers purchased medicines to the compartment of the electronic medicine box offline, and the offline delivery terminal opens the electronic medicine box through the offline delivery terminal code.
3. The online drug purchase and delivery method based on rational drug use prescriptions according to claim 2, characterized in that: Step S5 further includes: after the patient pays through the electronic device, the patient's electronic device terminal code is automatically sent to the electronic medicine box; step S7 further includes: the online pharmacy's offline delivery of medicines is delivered to the partition of the electronic medicine box, and the electronic medicine box identifies the patient's electronic device terminal code by pairing it with the offline delivery terminal code, and sends a prompt message to the patient's electronic device.
4. An online drug purchase and delivery system based on rational drug use prescriptions, characterized in that: include: The system includes a patient's electronic device, a cloud pharmacy server, an online pharmacy terminal, an offline delivery terminal, and an electronic medicine box terminal. The cloud pharmacy server is connected to the patient's electronic device, the cloud pharmacy server, the online pharmacy terminal, the offline delivery terminal, and the electronic medicine box terminal. The patient's electronic device includes: a scanning and recognition module, an address information positioning module, a prescription selection module, an order placement module, and an information code generation module; the online pharmacy includes: a drug information matching module; the scanning and recognition module is used to scan and recognize paper prescriptions or electronic prescriptions, extract the drug names from the prescriptions, and send them to the cloud pharmacy server; the address information positioning module is used to input the patient's address information and send the address positioning information to the cloud pharmacy server, the cloud pharmacy server is used to match the drug names with drugs from nearby online pharmacies centered on the patient's address, and generate a purchase plan which is then sent to the patient's electronic device; the prescription... The medication selection module receives medication plan information and allows patients to choose a suitable plan based on price and distance. The ordering module allows patients to make payment after selecting a medication plan. The information code generation module generates an electronic device terminal code, which is automatically sent to the electronic medicine box via the patient's electronic device. The offline delivery terminal is used by delivery personnel and receives the offline delivery terminal code sent by the cloud pharmacy server. The electronic medicine box terminal is connected to the offline delivery terminal displayed on the delivery personnel's offline delivery terminal. After recognition, the electronic medicine box terminal automatically opens, and the delivery personnel place the medication into the designated compartment of the electronic medicine box terminal.
5. The online drug purchase and delivery system based on rational drug use prescriptions according to claim 4, characterized in that: The electronic medicine box is used to send a medication pickup notification to the patient's electronic device after the generated electronic device terminal code information is matched with all offline delivery terminal codes. The electronic medicine box is placed at the patient's residence.
6. The online drug purchase and delivery system based on rational drug use prescriptions according to claim 5, characterized in that: The cloud pharmacy server is also used to match the extracted drug names with online pharmacies, and generate a scheme that includes one or more drugs that meet the prescription drug catalog, based on the distance between the online pharmacy and the patient's address and the price of the drug.
7. The online drug purchase and delivery system based on rational drug use prescriptions according to claim 6, characterized in that: The online pharmacy sends the order information to the offline delivery terminal via the cloud pharmacy server, and the offline delivery terminal accepts the order and makes the delivery; the patient pays the fee to the cloud pharmacy via an electronic device, and the cloud pharmacy distributes the fee to the various online pharmacies within the medication purchase plan.
8. An electronic medicine box, characterized in that: The system includes a medicine box body (1), which contains more than one medicine sorting chamber (8). An electric door (5) is located at the bottom of the medicine box body (1), and the closed electric door (5) forms the bottom of each medicine sorting chamber (8). A cavity is located below the electric door (5), and a medicine frame (13) is located at the bottom of the cavity. An identification camera (3) and an information display screen (10) are installed on the outer wall of the medicine box body (1). Each medicine sorting chamber (8) is equipped with a monitoring head (15). The delivery person enters the offline delivery terminal code through the identification camera (3). The scan is identified and displayed on the information display screen (10). The medicine box cover (2) on the upper part of the medicine box body (1) is opened. The deliveryman puts the medicine into the medicine separation cavity (8). The monitoring head (15) monitors that the medicine has been put in. After all the offline delivery terminal codes are scanned, all the medicines are placed in the medicine separation cavity (8). After the electronic device terminal code information is matched with all the offline delivery terminal codes, a medicine retrieval prompt message is sent to the patient's electronic device. The patient opens the electric door (5) through the electronic device. All the medicines fall into the medicine box (13). The patient takes out all the medicines from the medicine box (13).
9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method of any one of claims 1 to 3.
10. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 3.