CN109815461B - Method for editing form - Google Patents

Method for editing form Download PDF

Info

Publication number
CN109815461B
CN109815461B CN201811490544.5A CN201811490544A CN109815461B CN 109815461 B CN109815461 B CN 109815461B CN 201811490544 A CN201811490544 A CN 201811490544A CN 109815461 B CN109815461 B CN 109815461B
Authority
CN
China
Prior art keywords
cell
row
object class
cells
steps
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811490544.5A
Other languages
Chinese (zh)
Other versions
CN109815461A (en
Inventor
白文涛
姜跃滨
冉德兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tianjian Source Technology Co ltd
Original Assignee
Beijing Tianjian Source Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tianjian Source Technology Co ltd filed Critical Beijing Tianjian Source Technology Co ltd
Priority to CN201811490544.5A priority Critical patent/CN109815461B/en
Publication of CN109815461A publication Critical patent/CN109815461A/en
Application granted granted Critical
Publication of CN109815461B publication Critical patent/CN109815461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

According to the technical scheme, the method for editing the table is provided, so that the user can customize the style of the nursing record template, can directly input natural language text, can directly synchronize data of a mobile terminal to a client through supporting direct binding of a data source, can set a column type as a date type or a drop-down option input mode through supporting auxiliary input, is greatly convenient for the user to operate, and reduces errors of medical behaviors.

Description

Method for editing form
Technical Field
The invention relates to the technical field of medical informatization, in particular to a method for editing a form, which is used for realizing the purposes that a user can customize a style of a nursing record template, can directly input a natural language text, directly bind a data source through support, can directly synchronize data of a mobile terminal into a client, can set a column type as a date type or a drop-down option input mode through support of auxiliary input, is greatly convenient for the user to operate, and reduces errors of medical behaviors.
Background
In medical practice, nurses need to perform professional care on patients, during which the nurses need to fill out a care record sheet for recording vital signs and care measures of the patients. The care ticket is a tabular form. The nursing work of the nurse in the hospital is extremely heavy, in traditional nursing work, the nurse needs to fill in various nursing record forms manually in paper form, maintains vital sign data and nursing measure data of every patient at every turn, and not only work load is big, moreover easily makes mistakes, and the revising needs to be rearranged and filled again, and a record form needs many people to write, and paper form easily causes the damage to lose, has greatly influenced nurse work efficiency.
Aiming at the defects in the prior art, the invention provides a method for editing a form, which is used for solving the technical problems in the prior art, and the nurse can store data in an electronic form, is not easy to lose and error, greatly submits the working efficiency of the nurse, and improves the safety of medical behaviors.
Disclosure of Invention
The invention aims to provide a method for editing a table, which is characterized by comprising the following steps of:
s100: designing a table structure frame;
s200: performing calculation design of a table based on the table structure frame and the display area size in the step S100;
s300: drawing a table based on the table calculated and designed in the step S200;
further, the method also comprises the following steps:
s400: the entered data is selected in the table.
Further, the method also comprises the following steps:
s500: binding the table with the database.
Further, the method also comprises the following steps:
s600: the data in the table is stored in a serializable xml structure.
Further, in step S100, the table structure frame includes a table object class, where the table object class includes a row set and a column set, the row set and the column set include a row object class and a column object class, respectively, the row object class and the column object class include a cell object class, and the cell formation class includes a paragraph object class.
Further, step S200 further includes the steps of:
s210: calculating the total width of the table according to the size of the document page and the margin;
s220: circulating all rows, and calculating the height width of the table row object class;
s230: the form border size and location coordinates on the screen are updated.
Further, step S220 further includes the steps of:
s221: calculating the total width of the rows according to the table width;
s222: and circulating all cells in the loop, and calculating the cell size.
S223: and (3) circulating all cells in the rows, and calculating the height of the cell with the largest height as the height of the row of the table to which the cell belongs.
S224: the width and height of the rows and cells calculated in the above steps are used to calculate the coordinate positions of all rows and cells starting from the first cell in the first row of the table.
S225: and updating the coordinate positions of all elements in the cells according to the coordinate positions calculated in the steps, the width and the height of the cells and the relative positions of the cell contents and the cells.
Further, step S300 further includes the steps of:
s310: drawing according to the row sequence of the table from the table object class in the drawing of the table frame, and circulating each row to draw;
s320: in the drawing of each line, sequentially drawing each cell in the line;
s330: the frame drawing of the table is controlled using the cell frame in step S320;
s340: completing the form drawing returns successful drawing, and the document frame starts drawing the next.
Further, step S320 further includes the steps of:
s321: if the cell is merged, the cell is not drawn, the merged cell of the cell is found, and then the area where the merged cell and the cell rectangle intersect is redrawn;
s322: if the form cell is set to be unprintable, judging that the form cell is not processed if the form cell is currently drawn in the printer;
s323: calculating an intersecting rectangular region of a display rectangular region and a table region rectangle of the current display;
s324: drawing a background, if the cell is in a user selection state, drawing the cell to select the background, and filling a rectangular area of the cell with a background color;
s325: if the cell is set to display the multi-header mode, drawing diagonal lines inside the form rectangle;
s326: drawing cell content text and pictures;
s327: drawing a table frame line;
s328: if the cell is set to be a fixed row, a table border line with the same height needs to be drawn for each row of characters or pictures of the cell content, all the text or picture rows in the cell are circulated, and if the rows intersect with the current display drawing cut rectangular area, rectangular borders of the text rows are drawn.
Further, the data selected to be input in step S400 is calendar data or data source data.
Further, step S600 further includes the steps of:
s610: the stored xml node names are defined in the table object class, the row object class, the column object class, and the cell object class.
S620: defining a storage function in a table object class, constructing an xml root node, calling the storage function of a table row by a circulating row, and transmitting the root node object into the function of the row.
S630: the table row storage function first generates xml nodes of the row, adds the nodes to the position below the root node in the step S620, sequentially traverses the cells in the row, calls the storage function of the cells, and transmits the xml nodes of the row into the cell function.
S640: the storage function of the cell is a recursive function, the cell firstly generates own xml node, then traverses all text and picture contents in the cell, sequentially generates the xml node, adds the xml node into a sub-level of the xml node of the cell, and generates the xml node through recursive traversal if container contents exist in the contents.
S650: after the layer call of the cell is completed, returning to the table storage function, and returning to the complete table xml node object.
Drawings
FIG. 1 is a flow chart of an embodiment of the invention
FIG. 2 is a sub-flowchart of step S200 in an embodiment of the invention
FIG. 3 is a sub-flowchart of step S220 in an embodiment of the present invention
FIG. 4 is a sub-flowchart of step S300 in an embodiment of the invention
FIG. 5 is a sub-flowchart of step S320 in an embodiment of the present invention
FIG. 6 is a sub-flowchart of step S600 according to an embodiment of the present invention
Detailed Description
For a better understanding of the present invention, embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The technical scheme of the application comprises the design of a table structure framework, the calculation design and drawing of a table, and in addition, the application can also customize data in the table, so that the input data can be selected in the table. The invention realizes the direct synchronization of the data of the mobile terminal to the client terminal by binding the table with the database. The following is presented in sequence.
A flow chart of one embodiment of the present application is shown in fig. 1. Step S100 is to design a framework of a table structure, wherein the framework of the table structure is defined as follows: the table tool is based on a bottom layer frame, a table structure frame is designed, the whole frame comprises a table object class, the table comprises a row set and a column set class, the row set comprises a plurality of row object classes, the row object class comprises a plurality of cell object classes, the cell object class comprises a plurality of paragraph object classes, and the paragraphs can comprise characters and pictures. A plurality of column object classes are included in the column set, and a single column object class includes a plurality of cell object classes. The cells in the columns and the cells in the rows belong to the same object class, but the data structures of the row and column sets are stored in two different data structures of the rows and the columns in a chained storage mode. If the cells are merged, the merged cell contains the location coordinates of the merged cell, and the merged cell stores the location index of the merged cell.
Step S200 is to perform a calculation design of the table based on the table structure frame in step S100. The calculation design flow of the table is shown in fig. 2 and 3. The process for calculating the height and width of the table is as follows:
s210: calculating the total width of the table according to the size of the document page and the margin;
s220: circulating all rows, and calculating the height width of the table row object class;
s230: the form border size and location coordinates on the screen are updated.
The flow of calculating the height width of the table row is as follows:
s221, calculating the total width of the rows according to the table width
S222, circulating all cells in the loop, and calculating the size of the cells
S223: and (3) circulating all cells in the rows, and calculating the height of the cell with the largest height as the height of the row of the table to which the cell belongs. If the cell does not span the row and the column in the step, saving all content heights of the cell as the maximum height in the row; if a cell is merged and the cell is the cell of the last row of merged cells, then the cell is cycled to merge all the height sums of the spanned rows of cells, if the difference of the height of the merged cell minus the height sum of the spanned rows is greater than the row maximum height calculated in the previous step, then the row maximum height value is altered, and if the height of the mouse drag is greater than the row maximum height calculated in the previous step, then the row maximum height value is altered. And (3) circulating all cells in the line, if the cells do not cross the line, the height of the cells is the maximum height of the line calculated in the previous step, if the cells are combined and the cells are the cells of the last line crossed by the combined cells, calculating the sum of the heights of all the crossed lines of the combined cells, and updating the sum of the heights of the combined cells calculated for the above purpose.
S224: the width and height of the rows and cells calculated in the above steps are used to calculate the coordinate positions of all rows and cells, i.e. the left and upper coordinate positions, starting from the first cell of the first row of the table.
S225: and updating the coordinate positions of all elements in the cells according to the coordinate positions and the width heights calculated in the steps and the relative positions of the cell contents and the cells.
After all the data structures are calculated, the table is drawn according to the size and the coordinate position, and the table is output and displayed. The flow of the table drawing as shown in fig. 4 and 5 is:
s310: drawing according to the row sequence of the table from the table object class in the drawing of the table frame, and circulating each row to draw;
s320, sequentially drawing each cell in each row in the drawing of each row;
s330: the frame drawing of the table is controlled using the cell frame in step S320
S340: completing the form drawing returns successful drawing, and the document frame starts drawing the next one
Wherein the cell drawing step S320 further includes the steps of:
s321: if the cell is merged, the cell is not drawn, the merged cell of the cell is found, and then the area where the merged cell and the cell rectangle intersect is redrawn;
s322: if the form cell is set to be unprintable, judging that the form cell is not processed if the form cell is currently drawn in the printer;
s323: calculating an intersecting rectangular region of a display rectangular region and a table region rectangle of the current display;
s324: drawing a background, if the cell is in a user selection state, drawing the cell to select the background, and filling a rectangular area of the cell with a background color;
s325: if the cell is set to display multi-header mode, then a diagonal line is drawn inside the form rectangle
S326: drawing text and picture of cell content
S327: and drawing a table frame line, judging whether to draw the table frame line according to whether four frames of the cells are displayed or not and whether the adjacent frames are displayed or not, for example, when the right frame of the first cell of the first row is not displayed and the left frame of the second cell of the first row is not displayed, the table line is not drawn, and otherwise, drawing the table frame line.
S328: if the cell is set to be a fixed row, a table border line with the same height needs to be drawn for each row of characters or pictures of the cell content, all the text or picture rows in the cell are circulated, and if the rows intersect with the current display drawing cut rectangular area, rectangular borders of the text rows are drawn.
The invention further comprises a step S400: the entered data is selected in the table. In the step, when specific predefined data is needed in the form document, an auxiliary input function is added, the first function is a calendar selection function, when a user operates a mouse to enter the cell area, a cell custom event is triggered, and a calendar input control is popped up below the adjacent part of the form rectangle in the triggered event, wherein the control comprises a calendar and time input control, a cancel button and a confirm button. Double clicking the date of the calendar control or clicking the ok button will fill in the selected date and time into the cells according to a predefined format, and a date display format may be set in the cell attribute interface. The second function is a drop-down data source selection function, predefined data sources can be maintained on the cell attribute interface, the data sources comprise display values and data values, the data source maintenance is completed, when a user operates a mouse or a keyboard to enable a cursor to enter the cell, a predefined event is triggered, a drop-down list selection control is popped up below the adjacent part of the form rectangle in the triggered event, and the content in the list is the data source maintained in the last step. Clicking on an item in the list with the user's mouse writes the display value and data value of the selected item into the cell. The two functions, when writing content, generate each word and digit into a character object class and then maintain it in an array that is added to the first paragraph of the cell. Thereby completing the function of selecting and inputting characters.
The invention also includes S500: binding the table with the database. When the document is stored, the document needs to interact with the database, and the table supports the data interaction with the relational database. In the relational database, the data is stored according to column headers and line data, and is in a standard table form, so that when a data table is bound into a table, the field names of the columns are maintained in advance (fig. 3), then the data table lines and the table lines are nested and circulated, each grid data of the data table is filled into each cell, and if the number of lines in the table is smaller than that of the data table, the table lines are automatically increased. If the number of table rows is greater than the data table, blank rows are automatically deleted. And then, calling a table calculation algorithm, recalculating the size and the position of the table, and drawing. After the binding is completed, the user can directly modify the contents in the table, after the modification is completed, the table can be regenerated into a data table according to the attribute of the row and column field, the contents of the data table are modified contents, and the generation logic is as follows: 1 according to the data table structure of the table structure component, the table structure comprises a field name, a column type and a table main key column. And 2, sequentially generating rows of the data table according to the row sequence of the table, and filling the rows into the data table according to the column corresponding sequence. The system program may then save the data table directly to the database.
The invention also includes S600: the data in the table is stored in an xml structure of the sequencable words. The step further comprises the steps of:
s610: the stored xml node names are defined in the table object class, the row object class, the column object class, and the cell object class.
S620: defining a storage function in a table object class, constructing an xml root node, calling the storage function of a table row by a circulating row, and transmitting the root node object into the function of the row.
S630: the table row storage function first generates xml nodes of the row, adds the nodes to the position below the root node in the step S620, sequentially traverses the cells in the row, calls the storage function of the cells, and transmits the xml nodes of the row into the cell function.
S640: the storage function of the cell is a recursive function, the cell firstly generates own xml node, then traverses all text and picture contents in the cell, sequentially generates the xml node, adds the xml node into a sub-level of the xml node of the cell, and generates the xml node through recursive traversal if container contents exist in the contents.
S650: after the layer call of the cell is completed, returning to the table storage function, and returning to the complete table xml node object.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the scope of the present invention. In addition, although specific terms are used in the present specification, these terms are merely for convenience of description and do not set any limit to the present invention.

Claims (8)

1. A method of editing a form, comprising the steps of: s100: designing a table structure frame; s200: performing calculation design of a table based on the table structure frame and the display area size in the step S100; s300: drawing a table based on the table calculated and designed in the step S200; step S200 further comprises the steps of: s210: calculating the total width of the table according to the size of the document page and the margin; s220: circulating all rows, and calculating the height width of the table row object class; s230: updating the size of the frame of the table and the position coordinates on the screen; step S300 further comprises the steps of: s310: drawing according to the row sequence of the table from the table object class in the drawing of the table frame, and circulating each row to draw; s320: in the drawing of each line, sequentially drawing each cell in the line; s330: the frame drawing of the table is controlled using the cell frame in step S320; s340: completing the drawing of the form, returning to successful drawing, and starting to draw the next document frame; step S320 further includes the steps of: s321: if the cell is merged, the cell is not drawn, the merged cell of the cell is found, and then the area where the merged cell and the cell rectangle intersect is redrawn; s322: if the form cell is set to be unprintable, judging that the form cell is not processed if the form cell is currently drawn in the printer; s323: calculating an intersecting rectangular region of a display rectangular region and a table region rectangle of the current display; s324: drawing a background, if the cell is in a user selection state, drawing the cell to select the background, and filling a rectangular area of the cell with a background color; s325: if the cell is set to display the multi-header mode, drawing diagonal lines inside the form rectangle; s326: drawing cell content text and pictures; s327: drawing a table frame line; s328: if the cell is set to be a fixed row, a table border line with the same height needs to be drawn for each row of characters or pictures of the cell content, all the text or picture rows in the cell are circulated, and if the rows intersect with the current display drawing cut rectangular area, rectangular borders of the text rows are drawn.
2. The method of editing a form of claim 1, further comprising the steps of: s400: the entered data is selected in the table.
3. A method of editing a form according to claim 1 or 2, further comprising the steps of: s500: binding the table with the database.
4. A method of editing a form according to any one of claim 3, further comprising the steps of: s600: the data in the table is stored in a serializable xml structure.
5. The method of claim 1, wherein the table structure frame in step S100 includes a table object class, the table object class includes a row set and a column set, the row set and the column set include a row object class and a column object class, respectively, the row object class and the column object class include a cell object class, and the cell formation class includes a paragraph object class.
6. The method of editing a form according to claim 5, wherein step S220 further comprises the steps of: s221: calculating the total width of the rows according to the table width; s222: circulating all cells in the loop, and calculating the size of the cells; s223: calculating the height of the cell with the largest height as the height of the belonging table row by circulating all cells in the ring; s224: the widths and heights of the rows and cells calculated in the above steps are used for calculating the coordinate positions of all rows and cells from the first cell of the first row of the table; s225: and updating the coordinate positions of all elements in the cells according to the coordinate positions calculated in the steps, the width and the height of the cells and the relative positions of the cell contents and the cells.
7. The method of editing a table according to claim 2, wherein the data selected to be input in step S400 is calendar data or data source data.
8. A method of editing a form according to claim 3, wherein step S600 further comprises the steps of: s610: defining the stored xml node names in the table object class, the row object class, the column object class and the cell object class; s620: defining a storage function in a table object class, constructing an xml root node, calling the storage function of a table row by a circulating row, and transmitting the root node object into the function of the row; s630: the table row storage function firstly generates xml nodes of the row, the nodes are added under the root node in the step S620, cells in the row are traversed in sequence, the storage function of the cells is called, and the xml nodes of the row are transmitted into the cell function; s640: the storage function of the cell is a recursive function, the cell firstly generates own xml node, then traverses all text and picture contents in the cell, sequentially generates the xml node, adds the xml node into a sub-level of the xml node of the cell, and recursively traverses to generate the xml node if container contents exist in the contents; s650: after the layer call of the cell is completed, returning to the table storage function, and returning to the complete table xml node object.
CN201811490544.5A 2018-12-07 2018-12-07 Method for editing form Active CN109815461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811490544.5A CN109815461B (en) 2018-12-07 2018-12-07 Method for editing form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811490544.5A CN109815461B (en) 2018-12-07 2018-12-07 Method for editing form

Publications (2)

Publication Number Publication Date
CN109815461A CN109815461A (en) 2019-05-28
CN109815461B true CN109815461B (en) 2024-02-09

Family

ID=66601971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811490544.5A Active CN109815461B (en) 2018-12-07 2018-12-07 Method for editing form

Country Status (1)

Country Link
CN (1) CN109815461B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1940913A (en) * 2006-09-15 2007-04-04 北京北大方正电子有限公司 Variable table data type setting method
CN101123022A (en) * 2006-08-07 2008-02-13 佳能株式会社 Image forming apparatus, print processing method, and charging control system
CN101882225A (en) * 2009-12-29 2010-11-10 北京中科辅龙计算机技术股份有限公司 Engineering drawing material information extraction method based on template
CN102193782A (en) * 2010-03-01 2011-09-21 北京中企开源信息技术有限公司 Method for operating table model
CN102201009A (en) * 2011-06-21 2011-09-28 深圳市凯立德科技股份有限公司 Form generating method and device
CN102567303A (en) * 2010-12-24 2012-07-11 北京大学 Typesetting method and device for variable official document data
CN104516867A (en) * 2013-09-30 2015-04-15 北大方正集团有限公司 Table reordering method and table reordering system
CN107656911A (en) * 2017-09-11 2018-02-02 北京京东尚科信息技术有限公司 Form processing method and its system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4885904B2 (en) * 2008-04-15 2012-02-29 コニカミノルタビジネステクノロジーズ株式会社 Image processing method, image processing program, and image processing apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123022A (en) * 2006-08-07 2008-02-13 佳能株式会社 Image forming apparatus, print processing method, and charging control system
CN1940913A (en) * 2006-09-15 2007-04-04 北京北大方正电子有限公司 Variable table data type setting method
CN101882225A (en) * 2009-12-29 2010-11-10 北京中科辅龙计算机技术股份有限公司 Engineering drawing material information extraction method based on template
CN102193782A (en) * 2010-03-01 2011-09-21 北京中企开源信息技术有限公司 Method for operating table model
CN102567303A (en) * 2010-12-24 2012-07-11 北京大学 Typesetting method and device for variable official document data
CN102201009A (en) * 2011-06-21 2011-09-28 深圳市凯立德科技股份有限公司 Form generating method and device
CN104516867A (en) * 2013-09-30 2015-04-15 北大方正集团有限公司 Table reordering method and table reordering system
CN107656911A (en) * 2017-09-11 2018-02-02 北京京东尚科信息技术有限公司 Form processing method and its system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Region segmentation for table image with unknown complex structure;S. Tsuruoka;《Proceedings of Sixth International Conference on Document Analysis and Recognition》;709-713 *
图像中表格转换成HTML表格的研究与实现;蒋东玉;《黑龙江科技信息》(第24期);172 *
基于PACS平台的收费模块设计与应用;李晓明;《医疗卫生装备》;第34卷(第07期);58-60 *
通用表格生成系统的实现;徐群;《计算机光盘软件与应用》;第15卷(第18期);56-57 *

Also Published As

Publication number Publication date
CN109815461A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
US11520978B2 (en) Form customization method and device
CN111475163B (en) Method, device and equipment for generating code file of view template and storage medium
US7707486B2 (en) Logical spreadsheets
JP3058129B2 (en) Data calculation device and machine-readable recording medium recording program
CN115146584B (en) Full-structured Web version electronic medical record editor system
JPH056907B2 (en)
JPH01223560A (en) Document generation system and use thereof
US20150161079A1 (en) File formats and methods for representing documents
US10984170B2 (en) Systems and/or methods for dynamic layout design
US20140215297A1 (en) File formats and methods for representing documents
CN108595396B (en) Automatic resume generation method and terminal
CN113849175A (en) Code generation method, device, equipment and storage medium
CN109815461B (en) Method for editing form
JP5672732B2 (en) Spreadsheet generation program, spreadsheet generation device, and spreadsheet generation method
CN110532257B (en) Method and system for visually presenting family tree data
JP2828301B2 (en) Control display processor for graphs and tables
CN114780084B (en) Configuration system for collaborative multi-type interactive interface design
Musa et al. Exploring Data Using R
JPH05189424A (en) Device and method for editing document
JPH06139240A (en) Table editing system
CN117667086A (en) Method for generating front-end page by dragging component
Umber Quattro Pro: An Introduction
JP3235404B2 (en) Layout correction device
JP3395372B2 (en) Table processing equipment
JPH0458370A (en) Device for spreadsheet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant