Method, device and storage medium for overprinting medical records
Through the combination of HTML5 Canvas and Windows API, the medical record data and pictures are merged and different page counts are adapted, which solves the problem of unclear font printing and abnormal printers in the medical record book, and improves the printing efficiency and aesthetics of the medical record book.
Patent Information
- Application Number
- CN202210351814.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-04-02
AI Technical Summary
During the outpatient diagnosis process, the folded part of the medical record makes it difficult to set the print page size, which can easily lead to unclear font printing or abnormal paper spitting of the printer.
Using HTML5 Canvas to create a template maker, process the medical record data paging, and use Windows API to merge odd and even page pictures into one picture, and send medical record data pictures with different pages to the printer for overprinting.
It realizes clear font printing in the medical record, solves the problem of abnormal paper spitting of the printer, and improves the printing efficiency and aesthetics of the medical record book.
Smart Images

Figure CN114675795B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical record printing, and in particular to a method, device and storage medium for overprinting a medical record. Background Art
[0002] During outpatient diagnosis, the hospital will generally issue a medical record book to the patient. The first page of the medical record book is printed with the hospital's LOG and the patient's basic information. Each filling line of the medical record book has been printed. After the doctor diagnoses the patient, he / she will handwrite the diagnosis-related content and keep it for the patient. Handwritten medical records have the disadvantage of low writing efficiency. In order to overcome the disadvantages of handwritten medical records, some hospitals have implemented printing of medical records, but the following defects still exist: medical records have a folded part in the middle like a book. If the print page size is set to the size of the unfolded medical record, the printing program will easily print the words in the center of the medical record, resulting in some words not being able to be printed clearly. If the print page size is set to the size of the half side of the folded medical record, the printer will spit out paper abnormally and need to feed paper multiple times. Summary of the invention
[0003] As the above-mentioned medical record has a folded part in the middle like a book, if the print page size is set to the unfolded size of the medical record, the printing program will easily print the words in the center of the medical record, resulting in some words not being able to be printed clearly. If the print page size is set to the half size of the folded medical record, it will cause the printer to spit out paper abnormally and require multiple paper feedings. This application proposes a method, device and storage medium for overprinting medical records.
[0004] In a first aspect, the present application proposes a method for overprinting a medical record, comprising the following steps:
[0005] S1: Make template maker;
[0006] The S1 specifically includes the following steps:
[0007] S11: constructing basic elements on the canvas of HTML5 Canvas, wherein the basic elements include a table, text and data elements, and the text and data elements are located in cells of the table;
[0008] S12: Setting a printable attribute for each of the basic elements;
[0009] S13: logically dividing the canvas into multiple pages;
[0010] S14: setting key attributes for each of the data elements, wherein the key attributes include field identifier, segment name, field type, and display format;
[0011] S2: using the template maker to create a medical record template: using the table to layout the outline of the medical record, using the data element to mark the basic information of the patient, and using the data element to mark the position of the prescription;
[0012] S3: Obtain medical record data, and fill the main table class data in the medical record data into the corresponding data element position in the medical record template according to the field identifier set in the data element in the medical record template;
[0013] S4: Obtain prescription data, generate a prescription form according to the data format rule of the template maker, and then insert the prescription form into the position specified by the medical record template according to the prescription placeholder position identified in the medical record template to generate medical record data;
[0014] S5: using the HTML5 Canvas interface HTMLCanvasElement.toDataURL to convert the medical record data into medical record data images page by page, and the size of each medical record data image is the size of the medical record after folding;
[0015] S6: Determine the type of the medical record book. If the medical record book is of A4 type or single-page color printing type, directly send the medical record data image to the printer to complete the printing of the medical record book; if the medical record book is of book type, continue to determine the number of pages of the medical record data image. If the medical record data image is a single page, execute S7, otherwise execute S8;
[0016] S7: using Windows API to send the single medical record data image to the printer to complete the printing of the medical record book;
[0017] S8: Using the HTML5 Canvas interface, merge the adjacent odd-numbered page images and even-numbered page images in the medical record data image into one image to form a spliced medical record image;
[0018] S9: Utilize Windows API to send the spliced medical record image to the printer for overprinting of the medical record.
[0019] By adopting the above technical solution, HTML5 Canvas is first used to make a template maker, and then the template maker is used to make a medical record template, and then the medical record data and prescription data are obtained and filled into the medical record template to generate medical record data, and the HTML5 Canvas interface HTMLCanvasElement.toDataURL is used to convert the medical record data into medical record data images by page, and then the type of the medical record is determined, and the HTML5 Canvas interface is used to merge the adjacent odd-numbered page images and even-numbered page images in the medical record data image into one image to form a spliced medical record image, and the Windows API is used to send the spliced medical record image to the printer for medical record overprinting; it is achieved that the writing lines printed in the medical record are divided into two halves and printed into the medical record, which not only makes the words in the medical record print clearly, but also solves the problem of abnormal paper ejection by the printer, and improves the printing efficiency, aesthetics and practical effect of the medical record.
[0020] Preferably, the S9 specifically includes:
[0021] If the number of pages of the medical record data image is an even number, the spliced medical record image only includes a double-page spliced image. In this case, the double-page spliced image is directly sent to the printer using Windows API to perform medical record overprinting;
[0022] If the number of pages of the medical record data image is an odd number, the spliced medical record image includes a double-page spliced image and a last page image. At this time, the double-page spliced image is first sent to the printer using Windows API, and then the last page image is sent to the printer for medical record overprinting. This is suitable for even-numbered pages of medical record data images and odd-numbered pages of medical record data images.
[0023] Preferably, S3 specifically includes: obtaining medical record data, putting the main table class data of the medical record data into a Map, the Map contains field identifiers and field values, then finding a data element with the same field identifier in the medical record template, and setting the field value of the data element to the value of the field in the Map. This achieves the effect of filling the main table class data in the medical record data into the corresponding data element position in the medical record template according to the field identifier set in the data element in the medical record template.
[0024] Preferably, in S4, generating a prescription form from the prescription data according to the data format rule of the template maker specifically includes: directly assigning the first data of the prescription data to the data row of the medical record template, then inserting the assigned row below the data row, assigning the assigned row with the second data of the prescription data, and assigning the remaining prescription data to the medical record template in the same way. Thus, all the prescription data are inserted into the position specified by the medical record template.
[0025] Preferably, in S6, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send the medical record data image to the printer to complete the printing of the medical record book.
[0026] Preferably, in S7, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send the single medical record data image to the printer for overprinting of the medical record book.
[0027] Preferably, in S8, the HTML5 Canvas interface includes document.createElement, HTMLCanvasElement.getContext and CanvasDrawImage.drawImage.
[0028] In a second aspect, the present application also proposes a device for overprinting a medical record, characterized in that the device comprises:
[0029] A medical record template making module is configured to make a medical record template;
[0030] A medical record data filling module is configured to obtain medical record data and prescription data, and fill the medical record data and prescription data into the medical record template to generate medical record data;
[0031] A medical record data image generation module, configured to generate a medical record data image from the medical record data;
[0032] A medical record picture splicing module is configured to merge adjacent odd-numbered page pictures and even-numbered page pictures in the medical record data picture into one picture to form a spliced medical record picture;
[0033] The printing module is configured to send the medical record data image or the spliced medical record image to a printer for overprinting of the medical record.
[0034] In a third aspect, the present application further proposes a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the calculation method as described in the first aspect.
[0035] In summary, this application at least includes the following beneficial technical effects:
[0036] 1. Implement a template maker, which includes basic elements such as tables, text, data elements, and can be paginated;
[0037] 2. Use HTML5 Canvas interface to merge the adjacent odd-numbered page images and even-numbered page images in the medical record data image into one image to form a spliced medical record image, and use Windows API to send the spliced medical record image to the printer for overprinting in the medical record book; just make a template similar to WORD and adjust the layout of the medical record book to realize overprinting of the medical record book, and print it in two halves according to the printed writing lines of the medical record;
[0038] 3. This method not only allows the words in the medical record to be printed clearly, but also solves the problem of abnormal paper ejection by the printer; it improves the printing efficiency, aesthetics and practical effect of the medical record book. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and are used together with the description to explain the principles of the present application. It will be easy to recognize other embodiments and many expected advantages of the embodiments because they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar parts.
[0040] Figure 1 It is a flow chart of a method for overprinting a medical record in one embodiment of the present application.
[0041] Figure 2 It is a schematic diagram of a specific embodiment of the method for overprinting medical records according to the present application.
[0042] Figure 3 It is a schematic diagram of a medical record template in one embodiment of the present application.
[0043] Figure 4 It is a schematic diagram of filling prescription data in one embodiment of the present application.
[0044] Figure 5 This is a schematic diagram of complete medical record data in one embodiment of the present application.
[0045] Figure 6This is a schematic diagram of an embodiment of the present application in which the medical record book is of A4 type or a single-page color printing type.
[0046] Figure 7 This is a schematic diagram of a medical record book in an embodiment of the present application.
[0047] Figure 8 It is a schematic diagram of splicing medical record pictures in one embodiment of the present application.
[0048] Fig. 9 This is a schematic diagram of the printing of a medical record in one embodiment of the present application.
[0049] Fig.10 This is a diagram showing the effect of a medical record after printing in one embodiment of the present application.
[0050] Fig.11 It is a schematic diagram of the module structure of a device for overprinting medical records in one embodiment of the present application.
[0051] Fig.12 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION
[0052] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0053] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0054] Figure 1 A flowchart of a method based on medical record overprinting to which an embodiment of the present application can be applied is shown. Figure 2 is a schematic diagram of a specific embodiment of the method for overprinting medical records according to the present application, combined with reference Figure 1 and Figure 2 , the method specifically comprises the following steps:
[0055] S1: Make template maker;
[0056] In a specific embodiment, the template maker can insert basic elements such as tables, text, data elements (a data placeholder identifier), etc. The basic elements in the template support flow layout, and changes in the content and position of any element will affect the layout position of surrounding elements.
[0057] In a specific embodiment, the S1 specifically includes the following steps:
[0058] S11: constructing basic elements on the canvas of HTML5 Canvas, wherein the basic elements include a table, text and data elements, and the text and data elements are located in cells of the table;
[0059] Template Maker uses HTML5 Canvas as the technical foundation. HTML5 Canvas provides a canvas and methods for drawing basic text and graphics. Template Maker builds basic elements such as tables, text, and data elements on this basis. Each basic element is recorded in order. The document contains tables, the tables contain table rows, the table rows contain cells, and the cells contain text or data elements. When each element changes, the content is drawn in order to achieve streaming typesetting.
[0060] S12: Setting a printable attribute for each of the basic elements;
[0061] Each basic element has a printable attribute. When executing the printing interface to generate images, elements with the printable attribute set to false do not call the HTML5 Canvas drawing interface and do not draw. However, they are drawn when displayed for easy preview.
[0062] S13: logically dividing the canvas into multiple pages;
[0063] The template maker supports paging. According to the set page size and margins, the canvas area is logically divided into multiple pages. When displaying or printing, the positions of all elements on the template are calculated and compared with the page size and margins. The part that exceeds one page is drawn to the next page to achieve automatic paging processing.
[0064] S14: setting key attributes for each of the data elements, wherein the key attributes include field identifier, segment name, field type, and display format;
[0065] The functions of each field are as follows:
[0066] Field identifier: used to fill the value into the corresponding data element after the backend data is obtained. It corresponds to the English name of the field in the database table.
[0067] Field Name: Used to display the fields that need to be filled.
[0068] Field type: used to identify the type of field being filled, to facilitate special processing of numbers and time types, such as retaining decimals, time format, etc.
[0069] Display format identifier: used to record the display format, such as retaining decimals, time format, etc.
[0070] S2: Use the template maker to create a medical record template: use the table to layout the outline of the medical record, use the data element to mark the basic information of the patient, and use the data element to mark the location of the prescription; Figure 3 The following is a schematic diagram of the prepared medical record template.
[0071] S3: Obtain medical record data, and fill the main table class data in the medical record data into the corresponding data element position in the medical record template according to the field identifier set in the data element in the medical record template;
[0072] In a specific embodiment, S3 specifically includes: obtaining medical record data, putting the main table class data of the medical record data into a Map, wherein the Map contains field identifiers and field values, and then finding the data element with the same field identifier in the medical record template, and setting the field value of the data element to the value of the field in the Map.
[0073] When the printing program is executed, the patient data, prescription data, etc. in the system are extracted, and the main table class data (data records with only one record, such as patient information such as patient name and age) is automatically filled into the corresponding data element position in the template according to the field identifier set in the data element in the template. The automatic filling process is as follows. After the main table data is obtained, there is only one record, and the data is put into a Map. The key of the Map is the data element field identifier, and the Value is the value of the field, such as name key: patient_name, value: Zhang San. Find the data element with the field identifier patient_name in the template data model and set the value to Zhang San.
[0074] S4: Obtain prescription data, generate a prescription form according to the data format rule of the template maker, and then insert the prescription form into the position specified by the medical record template according to the prescription placeholder position identified in the medical record template to generate medical record data;
[0075] In a specific embodiment, Figure 4 As shown, in S4, generating a prescription form from prescription data according to the data format rule of the template maker specifically includes: directly assigning the first data of the prescription data to the data row of the medical record template, then inserting the assigned row below the data row, assigning the assigned row with the second data of the prescription data, and assigning the remaining prescription data to the medical record template in the same way. Figure 5 shown.
[0076] S5: Use HTML5 Canvas interface HTMLCanvasElement.toDataURL to convert the medical record data into medical record data images by page, and the size of each medical record data image is the size of the folded medical record; the number of pages of medical record data is the number of images converted.
[0077] S6: Determine the type of the medical record book. If the medical record book is of A4 type or single-page color printing type, directly send the medical record data image to the printer to complete the printing of the medical record book; if the medical record book is of book type, continue to determine the number of pages of the medical record data image. If the medical record data image is a single page, execute S7, otherwise execute S8;
[0078] In a specific embodiment, in S6, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send the medical record data image to the printer to complete the printing of the medical record book. Figure 6 As shown, the medical record booklet is A4 type or single-page color printing type; Figure 7 As shown, the medical record is a book type.
[0079] S7: using Windows API to send the single medical record data image to the printer to complete the printing of the medical record book;
[0080] In a specific embodiment, in S7, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send a single medical record data image to a printer for overprinting of the medical record book.
[0081] S8: Using the HTML5 Canvas interface, merge the adjacent odd-numbered page images and even-numbered page images in the medical record data image into one image to form a spliced medical record image;
[0082] In a specific embodiment, in S8, the HTML5 Canvas interface includes document.createElement, HTMLCanvasElement.getContext and CanvasDrawImage.drawImage.
[0083] S9: Utilize Windows API to send the spliced medical record image to the printer for overprinting of the medical record.
[0084] In a specific embodiment, the S9 specifically includes:
[0085] If the number of pages of the medical record data image is an even number, the spliced medical record image only includes a double-page spliced image. In this case, the double-page spliced image is directly sent to the printer using Windows API to perform medical record overprinting;
[0086] If the number of pages of the medical record data image is an odd number, the spliced medical record image includes a double-page spliced image and a last page image. At this time, the double-page spliced image is first sent to the printer using Windows API, and then the last page image is sent to the printer for medical record overprinting.
[0087] Reference Figure 8 , if the number of medical record pictures is greater than 1, use HTML5 Canvas technology to combine even-numbered pictures and odd-numbered pictures into one picture according to the data, and the size is exactly the size of the medical record after it is expanded. If there are 5 pictures, splice the 1st and 2nd pictures together, and splice the 3rd and 4th pictures together. The size of the spliced pictures is exactly equal to the size of the medical record after it is expanded. Use WindowsAPI CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc to send the picture data of the spliced pictures to the printer in sequence. If there is only one picture left, such as the 5th picture in the above example, use WindowsAPI CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc to send the picture data of the last picture to the printer to complete the printing of the medical record. If Fig. 9 and Fig.10 As shown, Fig. 9 This is a schematic diagram of the medical record printing. Fig.10 This is the effect after printing the medical record.
[0088] Further references Fig.11 As an implementation of the above method, the present application provides an embodiment of a device for overprinting medical records. Figure 1 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices.
[0089] refer to Fig.11 , a device for overprinting a medical record, comprising:
[0090] The medical record template making module 101 is configured to make a medical record template;
[0091] The medical record data filling module 102 is configured to obtain medical record data and prescription data, and fill the medical record data and prescription data into the medical record template to generate medical record data;
[0092] A medical record data image generation module 103 is configured to generate a medical record data image from the medical record data;
[0093] The medical record picture splicing module 104 is configured to merge adjacent odd-numbered page pictures and even-numbered page pictures in the medical record data picture into one picture to form a spliced medical record picture;
[0094] The printing module 105 is configured to send the medical record data image or the spliced medical record image to a printer for overprinting of the medical record.
[0095] Reference below Fig.12 , which shows a schematic diagram of the structure of a computer system 200 suitable for implementing an electronic device of an embodiment of the present application. Fig.12 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0096] like Fig.12 As shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 202 or a program loaded from a storage part 208 into a random access memory (RAM) 203. In the RAM 203, various programs and data required for the operation of the system 200 are also stored. The CPU 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0097] The following components are connected to the I / O interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the I / O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that a computer program read therefrom is installed into the storage section 208 as needed.
[0098] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 209, and / or installed from a removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, the above-mentioned functions defined in the method of the present application are executed.
[0099] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device implements the following when executing. Figure 1 The method shown in .
[0100] It should be noted that the computer-readable storage medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0101] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The above describes the specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0104] In the description of the present application, it should be understood that the terms "upper", "lower", "inside", "outside", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. The wording 'comprising' does not exclude the presence of elements or steps not listed in the claims. The wording 'one' or 'an' preceding an element does not exclude the presence of a plurality of such elements. The simple fact that certain measures are recorded in mutually different dependent claims does not indicate that a combination of these measures cannot be used for improvement. Any reference symbols in the claims should not be interpreted as limiting the scope.
Claims
1. A method for overprinting a medical record, characterized in that: The following steps are involved: S1: Make template maker; The S1 specifically includes the following steps: S11: constructing basic elements on the canvas of HTML5 Canvas, wherein the basic elements include a table, text and data elements, and the text and data elements are located in cells of the table; S12: Setting a printable attribute for each of the basic elements; S13: logically dividing the canvas into multiple pages, including logically dividing the canvas area into multiple pages according to the set page size and margin, calculating the positions of all elements on the template and comparing them with the page size and margin when displaying or printing, and drawing the part exceeding one page into the next page, so as to realize automatic paging processing; S14: Setting key attributes for each of the data elements, wherein the key attributes include field identifier, field name, field type, and display format; S2: using the template maker to create a medical record template: using the table to layout the outline of the medical record, using the data element to mark the basic information of the patient, and using the data element to mark the position of the prescription; S3: Obtain medical record data, and fill the main table data in the medical record data into the corresponding data element position in the medical record template according to the field identifier set in the data element in the medical record template; S4: Obtain prescription data, and fill the prescription data according to the data format of the template maker The rule generates a prescription form, and then inserts the prescription form into the position specified by the medical record template according to the prescription placeholder position identified in the medical record template to generate medical record data; S5: using the HTML5 Canvas interface HTMLCanvasElement.toDataURL to convert the medical record data into medical record data images page by page, and the size of each medical record data image is the size of the medical record after folding; S6: Determine the type of the medical record book. If the medical record book is of A4 type or single-page color printing type, directly send the medical record data image to the printer to complete the printing of the medical record book; if the medical record book is of book type, continue to determine the number of pages of the medical record data image. If the medical record data image is a single page, execute S7, otherwise execute S8; S7: using Windows API to send the single medical record data image to the printer to complete the printing of the medical record book; S8: Using the HTML5 Canvas interface, merge the adjacent odd-numbered page images and even-numbered page images in the medical record data image into one image to form a spliced medical record image, and execute S9; S9: using Windows API to send the spliced medical record image to a printer for overprinting of the medical record.
2. A method for overprinting medical records according to claim 1, characterized in that: Said S9 specifically includes: If the number of pages of the medical record data image is an even number, the spliced medical record image only includes a double-page spliced image. In this case, the double-page spliced image is directly sent to the printer using Windows API to perform medical record overprinting; If the number of pages of the medical record data image is an odd number, the spliced medical record image includes a double-page spliced image and a last page image. At this time, the double-page spliced image is first sent to the printer using Windows API, and then the last page image is sent to the printer for medical record overprinting.
3. A method for overprinting medical records according to claim 1, characterized in that: The S3 specifically includes: obtaining medical record data, putting the main table class data of the medical record data into a Map, wherein the Map contains field identifiers and field values, and then finding a data element with the same field identifier in the medical record template, and setting the field value of the data element to the value of the field in the Map.
4. A method for overprinting medical records according to claim 1, characterized in that: Where In S4, generating a prescription form based on the prescription data according to the data format rules of the template maker specifically includes: directly assigning the first data of the prescription data to the data row of the medical record template, then inserting the assigned row below the data row, assigning the assigned row with the second data of the prescription data, and assigning the remaining prescription data to the medical record template in the same way.
5. A method for overprinting medical records according to claim 1, characterized in that: In S6, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send the medical record data image to the printer to complete the printing of the medical record book.
6. A method for overprinting medical records according to claim 1, characterized in that: In the S7, Windows API CreateDC, CDC::StartPage, CImage::Draow, CDC::EndDoc are used to send the single medical record data image to the printer for medical record overprinting.
7. A method for overprinting medical records according to claim 1, characterized in that: In the S8, the HTML5 Canvas interface includes document.createElement, HTML5 CanvasElement.getContext and CanvasDrawImage.drawImage.
8. A device for overprinting medical records, characterized in that: According to a method for overprinting a medical record according to any one of claims 1 to 7, the device comprises: A medical record template making module is configured to make a medical record template; A medical record data filling module is configured to obtain medical record data and prescription data, and fill the medical record data and prescription data into the medical record template to generate medical record data; A medical record data image generation module is configured to generate medical record data from the medical record data picture; A medical record picture splicing module is configured to merge adjacent odd-numbered pictures and even-numbered page pictures in the medical record data picture into one picture to form a spliced medical record picture; The printing module is configured to send the medical record data image or the spliced medical record image to a printer for overprinting of the medical record.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for overprinting a medical record as described in any one of claims 1-7 is implemented.
