The synchronous method and front server of medical RIS system diagnostics reportTechnical field
The invention belongs to medical Internet technical field, more particularly to a kind of synchronization side of medical RIS system diagnostics reportMethod and a kind of front server.
Background technology
RIS (Radiology Information System, radiology information system) is applied in hospital image section officeSystem, mainly realized on RIS some operation flows and information (it is smaller based on word, without what mark followedIt is accurate) circulate and access.It is a kind of software systems for optimizing hospital radiological department Work Process Management.Doctor is preserved in RIS systemsTo the image file of the diagnosis report of patient, and corresponding patient information.
When doctor is that patient is diagnosed, papery diagnosis report can be provided, but papery diagnosis report is not portable, works as troubleWhen person goes to other hospitals to cure the disease, it can not also know the medical history of patient, information sharing can not be realized.
The content of the invention
In view of the above problems, it is an object of the invention to provide a kind of synchronous method of medical RIS system diagnostics report andA kind of front server, it is intended to solve the technical problem that diagnosis report can not be shared in existing RIS systems.
On the one hand, methods described comprises the steps:
A view is refreshed at interval at regular intervals, when finding to have newly-increased data in RIS systems, reads newly-increased troublePerson's numbering, the store path for checking numbering and diagnosis report image;
Diagnosis report image is read according to the store path of the diagnosis report image, and stored into file;
Whether there are newly-increased diagnosis report image, i.e. delta file every preset time run-down;
If delta file be present, the port completed is combined by using sockets sockets by delta file and rightThe patient code that answers, check that numbering is synchronized to cloud server.
On the other hand, the front server includes:
Refresh Data unit, refresh a view for being spaced at regular intervals, when finding there is newly-increased number in RIS systemsAccording to when, read newly-increased patient code, check numbering and diagnosis report image store path;
File storage unit, for reading diagnosis report image according to the store path of the diagnosis report image, and depositStore up in file;
Judging unit is scanned, for whether having newly-increased diagnosis report image, i.e. increment every preset time run-downFile;
Data synchronisation unit, if during for delta file be present, the port completed is combined by using sockets socketsBy delta file and corresponding patient code, check that numbering is synchronized to cloud server.
The beneficial effects of the invention are as follows:In the present invention, front server is arranged in hospital, and periodic refreshing view simultaneously obtainsNewly-increased data, and the diagnosis report view data energy real-time Transmission cloud server of RIS systems, are reduced to RIS system in hospitalThe load of itself;So patient is by being directly obtained the diagnosis report image of oneself by accessing front server can;Other hospitals can also search and access the diagnosis report of patient by authorizing, and save time and charge costs.Profit of the inventionWith new technology of Internet, the diagnosis report of all RIS system in hospital can be realized with relatively low cost and shared, be patient referralConveniently mode is provided, realizes storage and management of the patient to self data.
Brief description of the drawings
Fig. 1 is the flow chart of the synchronous method for the medical RIS system diagnostics report that first embodiment of the invention provides;
Fig. 2 is the flow chart of the synchronous method for the medical RIS system diagnostics report that second embodiment of the invention provides;
Fig. 3 is a kind of particular flow sheet of step S203 in Fig. 2;
Fig. 4 is the arrangement schematic diagram of diagnosis report image;
Fig. 5 is the fractionation schematic diagram of diagnosis report image;
Fig. 6 is the structured flowchart for the front server that the present invention the 3rd implements offer;
Fig. 7 is the structured flowchart for the front server that the present invention the 4th implements offer;
Fig. 8 is a kind of concrete structure block diagram of graphics processing unit.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and ExamplesThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Embodiment one:
Fig. 1 shows the flow of the synchronous method of medical RIS system diagnostics report provided in an embodiment of the present invention, in order to justThe part related to the embodiment of the present invention is illustrate only in explanation.
The synchronous method for the medical RIS system diagnostics report that the present embodiment provides comprises the steps:
Step S101, a view is refreshed at interval at regular intervals, when finding to have newly-increased data in RIS systems, readsTake newly-increased patient code, check the store path of numbering and diagnosis report image.
Hospital often does when doing image check for patient and once checks that can all generate unique checks numbers (ApllyID), and each patient has a patient code (Patient ID), for example, can including name, sex, cell-phone number,The information such as date of birth, while in RIS systems, diagnosis report image can all have a store path.Assuming that RIS system in hospitalIn unique check that numbering is 7, it is necessary to a byte;Name up to 4 Chinese characters are, it is necessary to 8 bytes, cell-phone number 13Position is, it is necessary to which 2 bytes, probably have 16 plus the other informations such as sex and birthdate, patient code's information in additionByte, patient code's information of 60 patients are about 1K bytes, and the time caused by this patient code's information is transmitted in networkDelay is negligible.
Step S102, diagnosis report image is read according to the store path of the diagnosis report image, and stores and arrive fileIn folder.
Front server, according to store path, reads figure after patient code has been read, check numbering from RIS systemsAs file, and store into the local file by the name of store path name.
Step S103, whether there are newly-increased diagnosis report image, i.e. delta file every preset time run-down;
If delta file step S104, be present, the port completed is combined by using sockets sockets increment is literaryPart and corresponding patient code, check that numbering is synchronized to cloud server.
In order to reduce the operating pressure of front server device, front server, only need to be every without real time scan local fileEvery preset time run-down, such as 1 minute.And in step S101, due to patient code, check numbering and diagnosisReport that the data volume of the store path of image is smaller, a view can be refreshed with every 1 second, in time go out diagnosis report image readingIt is stored in local.
After preset time, when finding there is newly-increased diagnosis report image, using sockets sockets port, it will increaseAmount file and corresponding patient code, check that numbering is synchronized to cloud server.
The Cloud Server can receive the data that each hospital's front server uploads as data storage center.OftenIndividual hospital all sets a front server, and so each front server obtains the diagnosis in corresponding RIS system in hospital respectivelyView data is reported, is then uniformly uploaded to cloud server.When patient or hospital need to check diagnosis report, awardedQuan Hou, searched from each front-end server and obtain required diagnosis report image.
This method by the diagnosis report view data in medical RIS systems and for patient code, check that numbering is sameStep is to front-end server, and then Timing Synchronization to cloud server, realizes RIS system diagnostics report view data and patient and itsHis medical institutions share.
Embodiment two:
Fig. 2 shows the flow of the synchronous method of medical RIS system diagnostics report provided in an embodiment of the present invention, in order to justThe part related to the embodiment of the present invention is illustrate only in explanation.
The synchronous method for the medical RIS system diagnostics report that the present embodiment provides comprises the steps:
Step S201, a view is refreshed at interval at regular intervals, when finding to have newly-increased data in RIS systems, readsTake newly-increased patient code, check the store path of numbering and diagnosis report image.
Step S202, diagnosis report image is read according to the store path of the diagnosis report image, and stores and arrive fileIn folder.
Above-mentioned steps S201 and S202 is identical with step S101 and S102 in embodiment one, repeats no more here.
Step S203, image fractionation combined treatment is carried out to the diagnosis report image of storage, and generates key.
As a kind of specific processing mode, as shown in figure 3, the step S203 is specifically included:
S301, diagnosis report image is ranked up according to sequencing.
Diagnosis report report typically has multiple, it is assumed that there is m width images.
S302, for every piece image, generate w-1 point at random in width, h-1 generated at random in short transversePoint, each image split into w × h grid block of pixels.
In each image, the grid pixel block size split into is random, and unrelated, each image has w × h pixelBlock.
S303, random one block of pixels of taking-up carries out first round selection from each width image in order, then from each width figureBlock of pixels progress the second wheel selection, all pixels so after w × h wheels are chosen are taken out as random in remaining block of pixelsBlock has been chosen, obtain a memory block matrix B=Wherein m is amount of images,TzXijWhen being chosen for the i-th wheel, the X that is randomly selected from z width imagesijIndividual block of pixels, here Xij∈[1,w×h]。
Reference picture 5, from piece image to m width images, a block of pixels is randomly selected successively, is then proceeded to eachContinue to randomly select in the remaining block of pixels of image, until the block of pixels selection of all images finishes.Here m width image point is markedWei not T1、T2、…、Tm, in the first round is chosen, image T1X11Individual block of pixels is selected, image T2X12Individual block of pixelsIt is selected, image TmX1mIndividual block of pixels is selected, and selected pixels block is respectively labeled as T1X11、T2X12、、TmX1m.According toIt is secondary to analogize, then, when the i-th wheel is chosen, the X that is randomly selected from z width imagesijIndividual block of pixels, can mark and bezXij.InstituteAfter the block of pixels for having image has been chosen, obtain a memory block matrix B=ShouldMatrix is the data for reconfiguring to obtain after image is split.
S304, it is that each block of pixels stored in block matrix is multiplied by a luminance factor, obtains deformation matrixWhereinWherein functionRepresent block of pixels F average brightness value, brightness value on the basis of D, the delta file after the processing is the changeShape Matrix C.As j=m,As j=1,
Each block of pixels is multiplied by order to which further the data in block of pixels are encrypted, in this step a brightness becauseSon, block of pixels TzXijLuminance factor be αij, chosen for the i-th wheel, image TzIn the X that randomly selectsijIndividual block of pixels it is brightSpend the factor and other all images when the block of pixels selected by front-wheel is related, and also before and after being averaged selected by two sub-picturesBrightness is related, in expression formula, brightness value on the basis of D, for definite value known to acquiescence.
Key corresponding to S305, generation Current Diagnostic report image, the key include w and h, in addition to cipher key matrix
Image after splitting combined treatment needs that by key decryption reduction could be realized at front server end.ThisIn key selected w and h when including splitting in figure, also include cipher key matrix certainlyHere during cipher key matrix is often wheel selects, the numbering X of the specifically chosen block of pixels of each imageij.Of course for fast and easy meterCalculate, the key also includes luminance factor matrix
In above-mentioned cipher key matrix E, cipher key matrix can further be deformed so that cipher key matrix is safer.ThisIn 2 × 2 region segmentations are proceeded by from the upper left corner to the cipher key matrix that includes, there are 4 elements in each region, in each regionElement according to a position rotationally clockwise, if the columns of cipher key matrix is odd number, do not handle last column element,If the line number of cipher key matrix is odd number, last column element is not handled.
Step S204, whether there are newly-increased diagnosis report image, i.e. delta file every preset time run-down.
If delta file step S205, be present, the port completed is combined by using sockets sockets by after processingDelta file and key and corresponding patient code, check that numbering is synchronized to cloud server.
The present embodiment is with the difference of embodiment one, and in the present embodiment, front-end server is preserving diagnosis report figure, it is necessary to carry out fractionation combined treatment, i.e. encryption to diagnosis report image as after, and obtain key.Then again every defaultThe diagnosis report image whether time sweep increases newly, i.e. delta file, the view data after the delta file is untreated.IfDelta file be present, using sockets sockets port, by delta file and corresponding patient code, check that numbering is synchronousTo cloud server.So diagnosis report image, in the case where not obtaining key, can not reduce patient by processingDiagnosis report image, the privacy of patient is ensure that, it is aobvious to the processing of diagnosis report image encryption especially for some Very Important PersonObtain particularly important.
In addition, during specific implementation, above-mentioned steps S205 is specifically included:
First, a handshake is sent to cloud server;
Then, after feedback signal is received, by patient code and check that numbering is sent to cloud server, and receive cloudThe storage address for holding server to return;
Finally, obtain last byte of patient code, when for odd number when, by the odd-line pixels block in deformation matrix CCloud server is synchronized to, even rows block is then synchronized to cloud server, finally by key synchronization to cloud serviceDevice;When for even number when, the even rows block in deformation matrix C is synchronized to cloud server, then by odd-line pixels blockCloud server is synchronized to, finally by key synchronization to cloud server.
Embodiment three:
Fig. 6 shows the structure of front server provided in an embodiment of the present invention, illustrate only for convenience of description and thisThe related part of inventive embodiments.
The front server that the present embodiment provides includes:
Refresh Data unit 71, refresh a view for being spaced at regular intervals, it is newly-increased when finding to have in RIS systemsDuring data, read newly-increased patient code, check the store path of numbering and diagnosis report image;
File storage unit 72, for reading diagnosis report image according to the store path of the diagnosis report image, andStore in file;
Judging unit 73 is scanned, for whether there is newly-increased diagnosis report image every preset time run-down, that is, is increasedMeasure file;
Data synchronisation unit 74, if during for delta file be present, the end completed is combined by using sockets socketsDelta file and corresponding patient code, inspection numbering are synchronized to cloud server by mouth.
Above-mentioned each functional unit 71-74 correspondingly realizes the step S101-S104 in embodiment one.Specifically realizedFunction repeats no more here.
Example IV:
Fig. 7 shows the structure of front server provided in an embodiment of the present invention, illustrate only for convenience of description and thisThe related part of inventive embodiments.
The front server that the present embodiment provides includes:
Refresh Data unit 81, refresh a view for being spaced at regular intervals, it is newly-increased when finding to have in RIS systemsDuring data, read newly-increased patient code, check the store path of numbering and diagnosis report image;
File storage unit 82, for reading diagnosis report image according to the store path of the diagnosis report image, andStore in file;
Graphics processing unit 83, combined treatment is split for carrying out image to the diagnosis report image of storage, and generated closeKey.
Judging unit 84 is scanned, for whether there is newly-increased diagnosis report image every preset time run-down, that is, is increasedMeasure file;
Data synchronisation unit 85, if during for delta file be present, the end completed is combined by using sockets socketsDelta file after processing and key and corresponding patient code, inspection numbering are synchronized to cloud server by mouth.
Above-mentioned each functional unit 81-85 correspondingly realizes the step S201-S205 in embodiment two.Specifically realizedFunction repeats no more here.
As a kind of preferred structure, as shown in figure 8, above-mentioned graphics processing unit 83 includes:
Image order module 831, for diagnosis report image to be ranked up according to sequencing;
Image splits module 832, for for every piece image, w-1 point being generated at random in width, in height sideTo h-1 point of random generation, each image splits into w × h grid block of pixels;
Pixel chooses module 833, and block of pixels first polling of progress is taken out for random from each width image in orderTake, it is then random from each remaining block of pixels of width image to take out block of pixels progress the second wheel selection, so by w × hWheel choose after all pixels block be chosen, obtain a memory block matrix B=ItsMiddle m is amount of images, TzXijWhen being chosen for the i-th wheel, the X that is randomly selected from z width imagesijIndividual block of pixels, here Xij∈[1,w×h];
Matrix deformation module 834, for being multiplied by a luminance factor for each block of pixels in storage block matrix, obtain deformation matrixWhereinWherein functionRepresent block of pixels F average brightness value, brightness value on the basis of D, the delta file after the processing is the changeShape Matrix C;
Key production module 835, for generate Current Diagnostic report image corresponding to key, the key include w withH, in addition to cipher key matrix
The key production module 835, in addition to:
Key handling unit, 2 × 2 region segmentations, each region are proceeded by from the upper left corner for the cipher key matrix that includesThere are 4 elements, to the element in each region according to a position rotationally clockwise, if the columns of cipher key matrix is strangeNumber, then do not handle last column element, if the line number of cipher key matrix is odd number, do not handle last column element.
Further, include as a kind of preferred structure, the data synchronisation unit 85:
Signal transmitting module, for sending a handshake to cloud server;
Data transmission blocks, for after feedback signal is received, by patient code and checking that numbering is sent to high in the clouds clothesBusiness device, and receive the storage address of cloud server return;
Image synchronous module, for obtaining last byte of patient code, when for odd number when, by deformation matrix COdd-line pixels block is synchronized to cloud server, and even rows block then is synchronized into cloud server, finally that key is sameWalk to cloud server;When for even number when, the even rows block in deformation matrix C is synchronized to cloud server, then willOdd-line pixels block is synchronized to cloud server, finally by key synchronization to cloud server.
Can be with it will appreciated by the skilled person that realizing that all or part of step in above-described embodiment method isThe hardware of correlation is instructed to complete by program, described program can be stored in a computer read/write memory mediumIn, described storage medium, such as ROM/RAM, disk, CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present inventionAll any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.