Disclosure of Invention
Based on the above, the invention aims to provide a continuous printing method, a system, a storage medium and equipment for electronic medical records, so as to solve the problems that in the prior art, continuous printing is inaccurate due to continuous printing positioning caused by cutting printing content by manually dragging positioning coordinates by a user, and repeated printing or less printing is caused.
In one aspect, the invention provides a method for continuously playing an electronic medical record, which comprises the following steps:
acquiring screen resolution and page data, wherein the page data comprises page size, and a display area is calculated according to the screen resolution and the page size, and comprises a plurality of cells, and each cell correspondingly accommodates a character;
establishing region coordinates according to cells in the display region;
acquiring a character area of the printed character, and determining the tail character coordinates of the printed character according to the character area of the printed character and the area coordinates;
obtaining virtual coordinates of a next cell corresponding to the end character according to the coordinates of the end character, wherein the next cell corresponding to the end character comprises a cell immediately following the end character in the same row and a line-changing cell for line-changing the end character;
and obtaining the character to be printed and a printing instruction, wherein the printing instruction comprises immediately following printing and line feed printing, and obtaining virtual coordinates of immediately following cells/line feed cells according to the printing instruction so as to continuously print the character to be printed.
In addition, the electronic medical record continuous playing method provided by the invention can also have the following additional technical characteristics:
further, the step of acquiring the screen resolution and the page data and calculating the display area according to the screen resolution and the page size includes:
acquiring screen resolution, and acquiring pixel points in the unit area according to the screen resolution;
and calculating according to the pixel points in the unit area and the page size to obtain the display area.
Further, in the step of calculating the display area according to the pixel point in the unit area and the page size:
the method for calculating the height of the display area comprises the following steps:
height(px)= height(cm)*DPI[0] / 25.4(mm);
the width size calculation method of the display area comprises the following steps:
width(px)= width(cm)*DPI[1] / 25.4(mm);
wherein height (px) is a height pixel of the display region, height (cm) is a height dimension of the display region, DPI [0] is a number of vertical pixels per inch length, width (px) is a width pixel of the display region, width (cm) is a width dimension of the display region, and DPI [1] is a number of horizontal pixels per inch length.
Further, the step of obtaining the virtual coordinates of the next cell corresponding to the end character according to the coordinates of the end character includes:
acquiring an end character and judging whether the end character is completely displayed;
if the display is not complete, taking the end character as the initial character of the next cell;
and if the display is complete, acquiring the virtual coordinate of the next cell corresponding to the end character.
Further, in the step of acquiring the virtual coordinates of the immediately following cell/line feed cell according to the print instruction to continue printing the character to be printed:
when the printing instruction is immediately followed by printing, the method for acquiring the virtual coordinates of the immediately followed cell is as follows:
adding 1 to the abscissa in the coordinates of the tail character to be the abscissa of the virtual coordinate;
the ordinate in the coordinates of the tail character is unchanged to be the ordinate of the virtual coordinate;
when the printing instruction is line feed printing, the method for acquiring the virtual coordinates of the line feed unit cells comprises the following steps:
the abscissa in the coordinates of the tail character is unchanged to be the abscissa of the virtual coordinate;
the ordinate in the end character coordinates is added to 1 as the ordinate of the virtual coordinates.
In one aspect, the present invention further provides an electronic medical record continuous playing system, including:
the first acquisition module is used for acquiring screen resolution and page data, wherein the page data comprises page size, a display area is calculated according to the screen resolution and the page size, the display area comprises a plurality of cells, and each cell correspondingly accommodates a character;
the creation module is used for creating area coordinates according to the cells in the display area;
the second acquisition module is used for acquiring a character area of the printed character and determining the tail character coordinates of the printed character according to the character area of the printed character and the area coordinates;
the third acquisition module is used for acquiring virtual coordinates of a next cell corresponding to the end character according to the coordinates of the end character, wherein the next cell corresponding to the end character comprises immediately following cells of the end character in the same row and line-feed cells of the end character in a line feed manner;
and the continuous printing module is used for acquiring characters to be printed and a printing instruction, wherein the printing instruction comprises immediately following printing and line feed printing, and virtual coordinates immediately following the cells/line feed cells are acquired according to the printing instruction so as to continuously print the characters to be printed.
In another aspect, the present invention provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the method for continuous printing of electronic medical records described above.
The invention also provides a data processing device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the electronic medical record continuous playing method when executing the program.
According to the electronic medical record continuous printing method, the system, the storage medium and the equipment, the virtual coordinates are marked by using the relative coordinate method, the continuous printing row coordinates and the continuous printing vertical coordinates are accurately positioned according to the recorded virtual coordinates, the virtual coordinates are converted into the actual paper coordinates printed by the printer so as to drive the printer to print, so that a user can select the electronic medical record continuous printing or continuous printing in line with the last printing content, the character positioning accuracy is ensured, the problems of character broken printing, repeated printing and less printing are avoided, paper can be saved, the accuracy is improved, and the user experience is improved.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
In order to solve the problem that in the prior art, the continuous printing duration is generally inaccurate in continuous printing positioning due to the fact that a user manually drags positioning coordinates to cut off printing contents, and the situation that repeated printing or less printing occurs exists. The application provides a method, a system, a storage medium and equipment for continuously printing electronic medical records, wherein a virtual coordinate is marked on each character by using a relative coordinate method, a continuously-printing row coordinate and a continuously-printing ordinate are accurately positioned according to a recorded virtual coordinate mode, the virtual coordinate is converted into an actual paper coordinate printed by a printer so as to drive the printer to print, so that a user can continuously print or continuously print a line according to self selection and follow up the last printing content, the character positioning accuracy is ensured, the problems of character breaking printing, repeated printing and less printing are avoided, paper can be saved, the accuracy is improved, and the user experience is improved.
In order to facilitate an understanding of the invention, several embodiments of the invention will be presented below. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Example 1
Referring to fig. 2, a method for continuously playing electronic medical records according to a first embodiment of the present invention includes steps S101-S105:
s101, acquiring screen resolution and page data, wherein the page data comprises page size, and calculating a display area according to the screen resolution and the page size, wherein the display area comprises a plurality of cells, and each cell correspondingly accommodates a character.
Referring to fig. 3, as a specific example, further, step S101 specifically includes steps S1011-S1012:
s1011, acquiring screen resolution, and acquiring pixel points in the unit area according to the screen resolution.
S1012, calculating to obtain a display area according to the pixel point in the unit area and the page size.
In this embodiment, let DPI be the number of pixels per inch n (i.e., logical pixels px); the resolution is the number set of the pixel points of the screen on the abscissa and the ordinate of each inch, and the common values are 480, 480 and 320; creating a box a with the length and the height of 1cm respectively, wherein one inch = 2.54cm, and calculating the pixel point number of a = n/2.54 (mm); taking printing A4 paper and A5 paper as examples, the sizes of A4 paper are: 210X 297mm, the size of the A5 paper is: 148×210mm, and according to the pixel points of the a, how many pixel points A4 and A5 exist can be calculated. Further, the size of the display area of the printer can be calculated when printing the A4 or A5 paper.
In particular, the method comprises the steps of,
the method for calculating the height of the display area comprises the following steps:
height(px)= height(cm)*DPI[0] / 25.4(mm);
the width size calculation method of the display area comprises the following steps:
width(px)= width(cm)*DPI[1] / 25.4(mm);
wherein height (px) is a height pixel of the display region, height (cm) is a height dimension of the display region, DPI [0] is a number of vertical pixels per inch length, width (px) is a width pixel of the display region, width (cm) is a width dimension of the display region, and DPI [1] is a number of horizontal pixels per inch length.
In this embodiment, because of the different print terminals, the resolutions thereof may be different, in order to avoid affecting the printing effect due to the difference of the resolutions, the resolutions of the printer need to be converted into units before printing, and DPI pixels on the display terminal are converted into PX, so that the printer is convenient to print. That is, in the present application, the display area size is calculated according to the screen resolution and the page setting, PX is converted according to DPI, and the unit PX is unified, thereby completing printing.
S102, establishing region coordinates according to the cells in the display region.
S103, acquiring a character area of the printed character, and determining the tail character coordinates of the printed character according to the character area and the area coordinates of the printed character.
S104, obtaining virtual coordinates of a next cell corresponding to the end character according to the end character coordinates, wherein the next cell corresponding to the end character comprises a cell immediately following the end character of the same line and a line-changing cell of the line-changing end character.
Referring to FIG. 4, the initial virtual X-axis coordinate point of each row is set to X n The initial virtual Y-axis coordinate point of the first page is Y n The method comprises the steps of carrying out a first treatment on the surface of the It can be understood that the virtual coordinates of the character to be printed are (X n ,Y n ). Specifically, it is assumed that one element coordinate is (X 1 ,Y 1 ) The virtual coordinate of this element corresponding to the next character is (X) 1 +X n ,Y 1 + Y n ) The method comprises the steps of carrying out a first treatment on the surface of the Calculating the virtual coordinates of the 2 nd character at each printing as (X 1 +X n ,Y 1 + Y n ) The virtual coordinates of the 3 rd character are (X 2 +X n ,Y 2 + Y n ) The virtual coordinates of the last character are (X n-1 +X n ,Y n-1 + Y n )。
For better understanding of the present scheme, statistics can be performed in a form of a cell corresponding to each character, that is, the coordinates of each cell can be understood as (X 1 ,Y 1 ) The virtual coordinates of the 2 nd character are (X 1 +X n ,Y 1 + Y n ) The virtual coordinates of the 3 rd character are (2X 1 +X n ,2Y 1 + Y n )。
Further, the step of obtaining the virtual coordinates of the next cell corresponding to the end character according to the coordinates of the end character includes:
acquiring an end character and judging whether the end character is completely displayed;
if the display is not complete, taking the end character as the initial character of the next cell;
and if the display is complete, acquiring the virtual coordinate of the next cell corresponding to the end character.
S105, acquiring characters to be printed and a printing instruction, wherein the printing instruction comprises immediately following printing and line feed printing, and acquiring virtual coordinates of immediately following cells/line feed cells according to the printing instruction so as to continuously print the characters to be printed.
Further, in the step of acquiring virtual coordinates immediately following the cell/line feed cell according to the print instruction to continue printing the character to be printed:
when the printing instruction is immediately followed by printing, the method for acquiring the virtual coordinates of the immediately followed cell is as follows:
adding 1 to the abscissa in the coordinates of the tail character to be the abscissa of the virtual coordinate;
the ordinate in the coordinates of the tail character is unchanged to be the ordinate of the virtual coordinate;
when the printing instruction is line feed printing, the method for acquiring the virtual coordinates of the line feed unit cells comprises the following steps:
the abscissa in the coordinates of the tail character is unchanged to be the abscissa of the virtual coordinate;
the ordinate in the end character coordinates is added to 1 as the ordinate of the virtual coordinates.
In summary, in the electronic medical record continuous printing method in the above embodiment of the present invention, by using the relative coordinate method to identify a virtual coordinate for each character, accurately positioning the continuous printing row coordinate and vertical coordinate according to the manner of recording the virtual coordinate, converting the virtual coordinate into the actual paper coordinate printed by the printer to drive the printer to print, so that the user can select the continuous printing or the continuous printing of the next printing content according to the user's own choice, thereby ensuring the accuracy of character positioning, avoiding the problems of character break printing, repeated printing and less printing, saving paper, improving accuracy, and improving user experience.
Example two
Referring to fig. 5, an electronic medical record follow-up system according to a second embodiment of the present invention includes:
the first acquisition module is used for acquiring screen resolution and page data, wherein the page data comprises page size, a display area is calculated according to the screen resolution and the page size, the display area comprises a plurality of cells, and each cell correspondingly accommodates a character;
the creation module is used for creating area coordinates according to the cells in the display area;
the second acquisition module is used for acquiring a character area of the printed character and determining the tail character coordinates of the printed character according to the character area of the printed character and the area coordinates;
the third acquisition module is used for acquiring virtual coordinates of a next cell corresponding to the end character according to the coordinates of the end character, wherein the next cell corresponding to the end character comprises immediately following cells of the end character in the same row and line-feed cells of the end character in a line feed manner;
and the continuous printing module is used for acquiring characters to be printed and a printing instruction, wherein the printing instruction comprises immediately following printing and line feed printing, and virtual coordinates immediately following the cells/line feed cells are acquired according to the printing instruction so as to continuously print the characters to be printed.
In summary, in the electronic medical record continuous printing system in the above embodiment of the present invention, by using the relative coordinate method to identify a virtual coordinate for each character, accurately positioning the continuous printing row coordinate and vertical coordinate according to the manner of recording the virtual coordinate, converting the virtual coordinate into the actual paper coordinate printed by the printer to drive the printer to print, so that the user can follow the last printing content to perform continuous printing or continuous printing in line according to the user's selection, thereby ensuring the accuracy of character positioning, avoiding the problems of character break printing, repeated printing and less printing, saving paper, improving accuracy, and improving user experience.
Furthermore, an embodiment of the present invention proposes a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements the steps of the method in the above-mentioned embodiment.
Furthermore, an embodiment of the present invention also proposes a data processing apparatus including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method in the above embodiment when executing the program.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.