Summary of the invention
The present invention is based on the problems referred to above, it is proposed that a kind of new technical scheme so that when network orDuring server fail, the information system of hospital still can use, doctor can with prescription andPrint prescription.
In view of this, the present invention proposes a kind of storage method of prescription, including: when being answered by B/SBeing used in when opening prescription in terminal, if detecting, network or server are unavailable, then the place that will openSide is stored in described terminal;When described network being detected and described server recovers normal, describedTerminal is set up by described network and the connection of described server, and the place that will open described in storageSide is uploaded to described server.
In this technical scheme, when applied by B/S in terminal, open prescription time, if net being detectedNetwork or server are unavailable, and off line carries out prescription and opens, and is stored in this locality.When network recovery is normalAutomatically recover on-line network pattern, and upload linking offline data.This makes when network or breaks downTime, the information system of hospital still can use, and doctor can be with prescription and printing prescription.With thisThe mode of kind completes emergency processing and does not lose data, the most significantly alleviates network or the system failure to eachThe immense pressure that hospital brings, reduces the social influence that system problem brings.
In technique scheme, it is preferable that also include: described terminal is by the described prescription openedUse general unique identifier to encode, and the prescription opened after coding is stored;WithAnd when described network being detected and described server recovers normal, described terminal is built by described networkThe prescription opened after the vertical connection with described server, and the described coding that will store is uploaded to instituteState server.
In this technical scheme, all business datum major keys use UUID (the most general unique identificationCode) mode encodes preservation, so, violates unique constraints when preventing data from uploading.
In technique scheme, it is preferable that also include: be connected to described server in described terminalTime, in described server Test database, whether the basic drug data of storage has renewal;DetectingWhen described basis drug data has renewal, the basic drug data updated is synchronized to described terminal.
In this technical scheme, when user logs in every time, whether check basic data (medicine dictionary) etc.Updating, if there being renewal, being synchronized to client local.In this manner it is ensured that the data kimonos in clientThe concordance of the data on business device.
In technique scheme, it is preferable that also include: monitor described network and described serverUse state, to determine whether described network and described server can be used.
In this technical scheme, monitoring network and service device in real time, to ensure in terminal off line, canLocally stored to carry out in time.
In technique scheme, it is preferable that also include: described terminal and/or described server rootDelete according to the newly-built order of the prescription received, prescription amendment order, prescription querying command and/or prescriptionOrder, provide the user correspondence the newly-built service of prescription, prescription amendment service, prescription inquiry service and/ or prescription deletion service.
In this technical scheme, the newly-built service of prescription, prescription amendment service, prescription inquiry can be supportedThe service such as service and/or prescription deletion service, thus user friendly operation.
According to a further aspect in the invention, additionally provide the storage device of a kind of prescription, including: storageUnit, when applied by B/S in terminal, open prescription time, if detecting, network or server can notWith, then the prescription opened is stored in described terminal;Uploading unit, when described network being detectedWhen recovering normal with described server, control described terminal and set up and described server by described networkConnection, and the prescription opened will be uploaded to described server described in storage.
In this technical scheme, when applied by B/S in terminal, open prescription time, if net being detectedNetwork or server are unavailable, and off line carries out prescription and opens, and is stored in this locality.When network recovery is normalAutomatically recover on-line network pattern, and upload linking offline data.This makes when network or breaks downTime, the information system of hospital still can use, and doctor can be with prescription and printing prescription.With thisThe mode of kind completes emergency processing and does not lose data, the most significantly alleviates network or the system failure to eachThe immense pressure that hospital brings, reduces the social influence that system problem brings.
In technique scheme, it is preferable that also include: coding unit, control described terminal by instituteState the prescription opened use general unique identifier to carry out encoding and, described memory element will codingAfter the prescription opened store;And described uploading unit is additionally operable to: when described net being detectedWhen network and described server recover normal, control described terminal and set up and described service by described networkThe connection of device, and the prescription opened after the described coding of storage is uploaded to described server.
In this technical scheme, all business datum major keys use UUID (the most general unique identificationCode) mode encodes preservation, so, violates unique constraints when preventing data from uploading.
In technique scheme, it is preferable that also include: detector unit, it is connected in described terminalDuring described server, in described server Test database, whether the basic drug data of storage has moreNewly;Data synchronisation unit, when detecting that described basis drug data has renewal, the basis that will updateDrug data is synchronized to described terminal.
In this technical scheme, when user logs in every time, whether check basic data (medicine dictionary) etc.Updating, if there being renewal, being synchronized to client local.In this manner it is ensured that the data kimonos in clientThe concordance of the data on business device.
In technique scheme, it is preferable that also include: monitoring unit, control described terminal monitoringThe use state of described network and described server, to determine that described network and described server whether may be usedWith.
In this technical scheme, monitoring network and service device in real time, to ensure in terminal off line, canLocally stored to carry out in time.
In technique scheme, it is preferable that also include: service unit, control described terminal and/Or described server is according to the newly-built order of the prescription received, prescription amendment order, prescription querying commandAnd/or prescription delete command, provide the user correspondence the newly-built service of prescription, prescription amendment service,Service deleted by prescription inquiry service and/or prescription.
In this technical scheme, the newly-built service of prescription, prescription amendment service, prescription inquiry can be supportedThe service such as service and/or prescription deletion service, thus user friendly operation.
By above technical scheme so that when network or when breaking down, the information system of hospital is stillCan use, doctor can be with prescription and printing prescription.Complete emergency processing by this way alsoDo not lose data, the most significantly alleviate the immense pressure that network or the system failure are brought to each hospital, subtractThe social influence that little system problem brings.
Detailed description of the invention
In order to be more clearly understood that the above-mentioned purpose of the present invention, feature and advantage, below in conjunction with attachedThe present invention is further described in detail by figure and detailed description of the invention.It should be noted that notIn the case of conflict, the feature in embodiments herein and embodiment can be mutually combined.
Elaborate a lot of detail in the following description so that fully understanding the present invention, but,The present invention can implement to use other to be different from other modes described here, therefore, and the present inventionProtection domain do not limited by following public specific embodiment.
Fig. 1 shows the schematic flow sheet of the storage method of prescription according to an embodiment of the invention.
As it is shown in figure 1, the storage method of the prescription of embodiments of the invention, including: step 102,When applied by B/S in terminal, open prescription time, if detecting, network or server are unavailable, thenThe prescription opened is stored in described terminal;Step 104, when described network and described being detectedWhen server recovers normal, described terminal is set up by described network and the connection of described server, andThe prescription opened described in storage is uploaded to described server.
In this technical scheme, when applied by B/S in terminal, open prescription time, if net being detectedNetwork or server are unavailable, and off line carries out prescription and opens, and is stored in this locality.When network recovery is normalAutomatically recover on-line network pattern, and upload linking offline data.This makes when network or breaks downTime, the information system of hospital still can use, and doctor can be with prescription and printing prescription.With thisThe mode of kind completes emergency processing and does not lose data, the most significantly alleviates network or the system failure to eachThe immense pressure that hospital brings, reduces the social influence that system problem brings.
In technique scheme, it is preferable that also include: described terminal is by the described prescription openedUse general unique identifier to encode, and the prescription opened after coding is stored;WithAnd when described network being detected and described server recovers normal, described terminal is built by described networkThe prescription opened after the vertical connection with described server, and the described coding that will store is uploaded to instituteState server.
In this technical scheme, all business datum major keys use UUID (the most general unique identificationCode) mode encodes preservation, so, violates unique constraints when preventing data from uploading.
In technique scheme, it is preferable that also include: be connected to described server in described terminalTime, in described server Test database, whether the basic drug data of storage has renewal;DetectingWhen described basis drug data has renewal, the basic drug data updated is synchronized to described terminal.
In this technical scheme, when user logs in every time, whether check basic data (medicine dictionary) etc.Updating, if there being renewal, being synchronized to client local.In this manner it is ensured that the data kimonos in clientThe concordance of the data on business device.
In technique scheme, it is preferable that also include: monitor described network and described serverUse state, to determine whether described network and described server can be used.
In this technical scheme, monitoring network and service device in real time, to ensure in terminal off line, canLocally stored to carry out in time.
In technique scheme, it is preferable that also include: described terminal and/or described server rootDelete according to the newly-built order of the prescription received, prescription amendment order, prescription querying command and/or prescriptionOrder, provide the user correspondence the newly-built service of prescription, prescription amendment service, prescription inquiry service and/ or prescription deletion service.
In this technical scheme, the newly-built service of prescription, prescription amendment service, prescription inquiry can be supportedThe service such as service and/or prescription deletion service, thus user friendly operation.
Fig. 2 shows the block diagram of the storage device of prescription according to an embodiment of the invention.
As in figure 2 it is shown, the storage device 200 of prescription according to an embodiment of the invention, including: depositStorage unit 202, when applied by B/S in terminal, open prescription time, if network or service being detectedDevice is unavailable, then be stored in described terminal by the prescription opened;Uploading unit 204, works as detectionTo described network and described server recover normal time, control described terminal set up by described network andThe connection of described server, and the prescription opened described in storage is uploaded to described server.
In this technical scheme, when applied by B/S in terminal, open prescription time, if net being detectedNetwork or server are unavailable, and off line carries out prescription and opens, and is stored in this locality.When network recovery is normalAutomatically recover on-line network pattern, and upload linking offline data.This makes when network or breaks downTime, the information system of hospital still can use, and doctor can be with prescription and printing prescription.With thisThe mode of kind completes emergency processing and does not lose data, the most significantly alleviates network or the system failure to eachThe immense pressure that hospital brings, reduces the social influence that system problem brings.
In technique scheme, it is preferable that also include: coding unit 206, control described terminalCarry out encoding by the described prescription the opened general unique identifier of employing and, described memory elementThe prescription opened after coding is stored by 202;And described uploading unit 204 is additionally operable to:When described network being detected and described server recovers normal, control described terminal by described networkSet up and the connection of described server, and the prescription opened after the described coding of storage is uploaded toDescribed server.
In this technical scheme, all business datum major keys use UUID (the most general unique identificationCode) mode encodes preservation, so, violates unique constraints when preventing data from uploading.
In technique scheme, it is preferable that also include: detector unit 208, in described terminal evenWhen being connected to described server, in described server Test database, whether the basic drug data of storage hasUpdate;Data synchronisation unit 210, when detecting that described basis drug data has renewal, will updateBasic drug data be synchronized to described terminal.
In this technical scheme, when user logs in every time, whether check basic data (medicine dictionary) etc.Updating, if there being renewal, being synchronized to client local.In this manner it is ensured that the data kimonos in clientThe concordance of the data on business device.
In technique scheme, it is preferable that also include: monitoring unit 212, control described terminalMonitor the use state of described network and described server, to determine that described network and described server areNo available.
In this technical scheme, monitoring network and service device in real time, to ensure in terminal off line, canLocally stored to carry out in time.
In technique scheme, it is preferable that also include: service unit 214, control described terminalAnd/or described server is according to the newly-built order of the prescription received, prescription amendment order, prescription inquiryOrder and/or prescription delete command, provide the user the newly-built service of prescription of correspondence, prescription amendment clothesService deleted by business, prescription inquiry service and/or prescription.
In this technical scheme, the newly-built service of prescription, prescription amendment service, prescription inquiry can be supportedThe service such as service and/or prescription deletion service, thus user friendly operation.
By above technical scheme so that when network or when breaking down, the information system of hospital is stillCan use, doctor can be with prescription and printing prescription.Complete emergency processing by this way alsoDo not lose data, the most significantly alleviate the immense pressure that network or the system failure are brought to each hospital, subtractThe social influence that little system problem brings.
Fig. 3 shows the idiographic flow signal of the storage method of prescription according to an embodiment of the inventionFigure.
As it is shown on figure 3, the idiographic flow bag of the storage method of prescription according to an embodiment of the inventionInclude:
Step 302, C/S structure and B/S structural composite client prepare.
Based on Google browser core component Webkit, exploitation shell is encapsulated as possessing this localityAccess ability combined type client.
Step 304, local data base prepares.Based on SQLLite, construct local datastoreAbility.
Step 306, service end prescription service development.Research and development service end prescription service, as prescription is newly-builtService, amendment service, inquiry service, deletion service etc., all of business datum coding usesUUID.Encapsulation data persistence layer, supports multitype database application.The Oracle used such as rear end, needsWanting persistence to support SQLLite and oracle database, all data accesses use standard simultaneouslySQL statement.
Step 308, service end service registry.The service of service end needs to be registered to combined type clientEnd.
Step 310, issues prescription serviced component.Prescription serviced component needs in server and combined typeClient is issued simultaneously.
Step 312, prepares combined type client data synchronization module.
When user logs in every time, basic data (medicine dictionary) etc. is to utilize data simultaneous module to checkNo renewal, if there being renewal, is synchronized to client local.
Step 314, prepares network or server failure monitor component.Whether may be used by this monitor componentNetworking.
When step 316, network or system exception, off line prescription.According to network monitoring result,Local service is called when network and system exception.All business datum major keys use UUID mode to encodePreserve, note using UUID, when preventing data from uploading, violate unique constraints.
Step 318, during network recovery, offline data is uploaded, and recovers networking operation pattern.
Technical scheme is described in detail, by the technical side of the present invention above in association with accompanying drawingCase so that when network or when breaking down, the information system of hospital still can use, and doctor is permissiblePrescription and printing prescription.Complete emergency processing by this way and do not lose data, the most significantlyAlleviate the immense pressure that network or the system failure are brought to each hospital, reduce the society that system problem bringsCan affect.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, forFor those skilled in the art, the present invention can have various modifications and variations.All essences in the present inventionWithin god and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present inventionProtection domain within.