Disclosure of Invention
Therefore, the invention aims to provide a method, a system, a storage medium and equipment for continuously printing an electronic medical record, so as to solve the problems that when continuously printing is in fault in the prior art, generally, a user manually drags and positions coordinates to intercept and select printing contents, so that continuous printing positioning is inaccurate, characters are intercepted and printed, and repeated printing or less printing is caused.
The invention provides a continuous printing method of an electronic medical record on one hand, which comprises the following steps:
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 contains a character;
establishing area coordinates according to the cells in the display area;
acquiring a character area of a printed character, and determining the tail character coordinate of the printed character according to the character area of the printed character and the area coordinate;
acquiring a virtual coordinate of a next cell corresponding to an end character according to an end character coordinate, wherein the next cell corresponding to the end character comprises an immediately following cell of the end character in the same line and a line-changing cell of the end character;
acquiring characters to be printed and printing instructions, wherein the printing instructions comprise next printing and line feed printing, and acquiring virtual coordinates of the next cell/line feed cell according to the printing instructions to continuously print the characters to be printed.
In addition, the electronic medical record continuous printing method according to 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 comprises the following steps:
acquiring screen resolution, and acquiring pixel points in a unit area according to the screen resolution;
and calculating according to the pixel points in the unit area and the page size to obtain a display area.
Further, in the step of calculating the display area according to the pixel points in the unit area by combining the page size:
the height size calculation method 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 the height pixel of the display area, height (cm) is the height size of the display area, DPI [0] is the longitudinal pixel point in each inch of length, width (px) is the width pixel of the display area, width (cm) is the width size of the display area, DPI [1] is the transverse pixel point in each inch of length.
Further, the step of acquiring the virtual coordinate of the next cell corresponding to the last character according to the last character coordinate includes:
acquiring a tail character and judging whether the tail character is completely displayed or not;
if the display is not complete, taking the last 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 last character.
Further, in the step of acquiring the 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 cells comprises the following steps:
adding 1 to the abscissa in the coordinates of the last character to be used as the abscissa of the virtual coordinate;
the vertical coordinate in the last character coordinate is unchanged to be used as the vertical coordinate of the virtual coordinate;
when the printing instruction is line feed printing, the method for acquiring the virtual coordinates of the line feed cell comprises the following steps:
the abscissa in the last character coordinate is unchanged to be used as the abscissa of the virtual coordinate;
and adding 1 to the ordinate in the last character coordinate to be used as the ordinate of the virtual coordinate.
The invention also provides an electronic medical record continuous printing system, which comprises:
the device comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring screen resolution and page data, 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 contains a character;
the creating 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 coordinate of the printed character according to the character area of the printed character and the area coordinate;
the third acquisition module is used for acquiring the virtual coordinate of a next cell corresponding to the last character according to the coordinate of the last character, wherein the next cell corresponding to the last character comprises an immediately following cell of the last character in the same line and a line-changing cell for line-changing the last character;
and the continuous printing module is used for acquiring characters to be printed and printing instructions, wherein the printing instructions comprise following printing and line feed printing, and the virtual coordinates of the following cells/line feed cells are acquired according to the printing instructions so as to continuously print the characters to be printed.
Another aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for continuously printing electronic medical records.
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 executes the program to realize the electronic medical record continuous printing method.
According to the electronic medical record continuous printing method, the system, the storage medium and the equipment, each character is marked with one virtual coordinate by using a relative coordinate method, the continuous printing line coordinate and the continuous printing longitudinal coordinate are accurately positioned according to the virtual coordinate recording mode, the virtual coordinate is converted into the actual paper coordinate printed by the printer to drive the printer to print, so that a user can continuously print or change lines for continuous printing according to the selection of the user immediately following the last printing content, the accuracy of character positioning is ensured, the problems of character continuous printing, repeated printing and less printing can not occur, paper can be saved, the accuracy is improved, and the user experience is improved.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. 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 in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In order to solve the problems that in the prior art, when a user continues to print a disease, the user generally manually drags a positioning coordinate to intercept and select printing contents, so that the continuous printing positioning is inaccurate, characters are intercepted and printed, and repeated printing or less printing is caused. The application provides a method, a system, a storage medium and equipment for continuous printing of an electronic medical record, a virtual coordinate is identified for each character by using a relative coordinate method, the continuous printing line coordinate and the vertical coordinate are accurately positioned according to a recording virtual coordinate mode, the virtual coordinate is converted into an actual paper coordinate printed by a printer to drive the printer to print, so that a user can select the virtual coordinate according to the user, continuous printing or line changing continuous printing is performed immediately after last printing content is printed, the accuracy of character positioning is ensured, the problems of character intermittent printing, repeated printing and less printing cannot occur, 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 are set forth 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 one
Referring to fig. 2, a method for continuously typing an electronic medical record in a first embodiment of the present invention is shown, which includes steps S101-S105:
s101, screen resolution and page data are obtained, the page data comprise page sizes, a display area is calculated according to the screen resolution and the page sizes, the display area comprises a plurality of cells, and each cell correspondingly contains a character.
Referring to fig. 3, as a specific example, further, step S101 specifically includes steps S1011 to S1012:
and S1011, acquiring the screen resolution, and acquiring pixel points in the unit area according to the screen resolution.
And S1012, calculating according to the pixel points in the unit area and the page size to obtain a display area.
In the present embodiment, it is assumed that DPI is the number of pixels per inch n (i.e., logical pixel px); the resolution is the collection of the number of pixels per inch on horizontal and vertical coordinates of the screen, and commonly takes 480 × 480, 320 × 480; creating a box a with the length of 1cm and the height of each box a, wherein one inch =2.54cm, and calculating the number of pixel points of a = n/2.54 (mm); taking printing A4 paper and A5 paper as an example, the size of A4 paper is: the dimensions of 210X 297mm, A5 paper were: 148 multiplied by 210mm, and the number of pixels A4 and A5 can be calculated according to the pixel points a. Further, the size of the display area of the printer when printing the A4 or A5 sheet can be calculated.
In particular, the method comprises the following steps of,
the height size calculation method 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 the height pixel of the display area, height (cm) is the height size of the display area, DPI [0] is the longitudinal pixel point in each inch of length, width (px) is the width pixel of the display area, width (cm) is the width size of the display area, DPI [1] is the transverse pixel point in each inch of length.
In this embodiment, the resolutions of different printing terminals may be different, and in order to avoid the influence on the printing effect due to the different resolutions, the resolution of the printer needs to be converted into a unit before printing, and DPI pixels on the display terminal are converted into PX, so that the printer can print conveniently. 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, the unit PX is unified, and printing is completed.
And S102, establishing area coordinates according to the cells in the display area.
S103, acquiring a character area of the printed character, and determining the tail character coordinate of the printed character according to the character area and the area coordinate of the printed character.
And S104, acquiring the virtual coordinate of the next cell corresponding to the last character according to the tail character coordinate, wherein the next cell corresponding to the last character comprises an immediately following cell of the same line of the last character and a line-changing cell of the line-changing last 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 (ii) a That is, it can be understood that the virtual coordinate of the character to be printed is (X) n ,Y n ). Specifically, assume that one element coordinate is (X) 1 ,Y 1 ) Then the virtual coordinate of this element corresponding to the next character is (X) 1 +X n ,Y 1 + Y n ) (ii) a Calculate the virtual coordinate of the 2 nd character at each print time as (X) 1 +X n ,Y 1 + Y n ) The virtual coordinate of the 3 rd character is (X) 2 +X n ,Y 2 + Y n ) And finally oneThe virtual coordinate of each character is (X) n-1 +X n ,Y n-1 + Y n )。
For better understanding of the present scheme, statistics can be performed in a form that each character corresponds to a cell, that is, the understandable coordinate of each cell is (X) 1 ,Y 1 ) The virtual coordinate of the 2 nd character is (X) 1 +X n ,Y 1 + Y n ) The virtual coordinate of the 3 rd character is (2X) 1 +X n ,2Y 1 + Y n )。
Further, the step of obtaining the virtual coordinate of the next cell corresponding to the last character according to the last character coordinate includes:
acquiring a tail character and judging whether the tail character is completely displayed;
if the display is not complete, taking the last 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 last character.
And S105, acquiring characters to be printed and printing instructions, wherein the printing instructions comprise next printing and line feed printing, and acquiring virtual coordinates of the next cell/line feed cell according to the printing instructions to continue printing 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 characters to be printed:
when the printing instruction is immediately followed by printing, the method for acquiring the virtual coordinates of the immediately followed cells comprises the following steps:
adding 1 to the abscissa in the last character coordinate to obtain the abscissa of the virtual coordinate;
the vertical coordinate in the last character coordinate is unchanged to be used as the vertical coordinate of the virtual coordinate;
when the printing instruction is line feed printing, the method for acquiring the virtual coordinates of the line feed cell comprises the following steps:
the abscissa in the last character coordinate is unchanged to be used as the abscissa of the virtual coordinate;
and adding 1 to the ordinate in the last character coordinate to be used as the ordinate of the virtual coordinate.
In summary, in the electronic medical record continuous printing method in the above embodiment of the present invention, a relative coordinate method is used to identify a virtual coordinate for each character, the line coordinate and the ordinate of continuous printing are accurately located according to the virtual coordinate recording method, and the virtual coordinate is converted into the actual paper coordinate printed by the printer to drive the printer to print, so that the user can perform continuous printing or line change continuous printing following the last printing content according to the selection of the user, thereby ensuring the accuracy of character location, avoiding the problems of character intermittent printing, repeated printing and less printing, saving paper, improving accuracy, and improving user experience.
Example two
Referring to fig. 5, an electronic medical record continuous printing system in a second embodiment of the invention is shown, which includes:
the device comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring screen resolution and page data, 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 contains a character;
the creating 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 coordinate of the printed character according to the character area of the printed character and the area coordinate;
the third acquisition module is used for acquiring the virtual coordinate of a next cell corresponding to the last character according to the coordinate of the last character, wherein the next cell corresponding to the last character comprises an immediately following cell of the last character in the same line and a line-changing cell for line-changing the last character;
and the continuous printing module is used for acquiring characters to be printed and printing instructions, wherein the printing instructions comprise following printing and line feed printing, and the virtual coordinates of the following cells/line feed cells are acquired according to the printing instructions 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, a virtual coordinate is identified for each character by using a relative coordinate method, the line coordinate and the vertical coordinate of continuous printing are accurately located according to the virtual coordinate recording method, and the virtual coordinate is converted into the actual paper coordinate printed by the printer to drive the printer to print, so that the user can perform continuous printing or line change continuous printing following the last printing content according to the selection of the user, thereby ensuring the accuracy of character location, avoiding the problems of character intermittent printing, repeated printing and less printing, saving paper, improving accuracy, and improving user experience.
Furthermore, an embodiment of the present invention also proposes a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method in the above-described embodiment.
Furthermore, an embodiment of the present invention also provides a data processing apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the method in the above-mentioned embodiment.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement 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 could even be paper or another suitable medium upon which the program is printed, as the program can 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 should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean 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 invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. 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 above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.