CN115510835A - Method and device for acquiring text template and method and device for generating medical record text - Google Patents

Method and device for acquiring text template and method and device for generating medical record text Download PDF

Info

Publication number
CN115510835A
CN115510835A CN202211154825.XA CN202211154825A CN115510835A CN 115510835 A CN115510835 A CN 115510835A CN 202211154825 A CN202211154825 A CN 202211154825A CN 115510835 A CN115510835 A CN 115510835A
Authority
CN
China
Prior art keywords
text
target
entity
template
history
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.)
Pending
Application number
CN202211154825.XA
Other languages
Chinese (zh)
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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202211154825.XA priority Critical patent/CN115510835A/en
Publication of CN115510835A publication Critical patent/CN115510835A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Medical Informatics (AREA)
  • Epidemiology (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The application provides a method and a device for acquiring a text template and a method and a device for generating a medical record text. In the application, the text template has no intelligence and divergence, the expression in the text template is controllable, for example, the expression in the text template does not change spontaneously after the text template is successfully set, the text, the placeholder and the relative position sequence between the text and the placeholder in the text template do not change spontaneously after the text template is successfully set, and the expression in the text template can be set as the expression according with a medical record text filling mode according to an actual condition, so that the possibility of redundant information existing in the generated medical record text of the patient can be reduced, and the generated related content of a part of keywords missing in the medical record text of the patient can be avoided.

Description

Method and device for acquiring text template and method and device for generating medical record text
Technical Field
The present application relates to the field of medical technology, and in particular, to a method for acquiring a text template, an apparatus for acquiring a text template, a method for generating a medical history text, and an apparatus for generating a medical history text.
Background
The case history text is the original record of the process of the patient diagnosing and treating in the medical institution, and often includes the course record, the inquiry record, the examination and examination result, the medical order, the operation record, the nursing record, and so on. At present, medical record texts of patients are written manually by medical staff according to the illness states of the patients after the medical staff consults the patients.
Disclosure of Invention
The application discloses a method and a device for acquiring a text template and a method and a device for generating a medical record text.
In a first aspect, a method for obtaining a text template is shown, which includes: acquiring a history text segment in an existing real history medical record text, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity; identifying the historical named entities in the historical text segment, and determining historical entity attributes of the historical named entities; and replacing the historical named entities in the historical text fragments by using the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments.
In a second aspect, a method for generating medical record text is shown, which includes: acquiring inquiry information, wherein the inquiry information comprises at least one target named entity related to the disease condition of the patient and target entity attributes of all the target named entities; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text template is used for generating text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities; the generated text template comprises a text template corresponding to a historical text fragment in an existing real historical medical record text, wherein the historical text fragment comprises historical named entities related to the disease condition and historical non-named entities except the historical named entities, the text template is obtained by replacing the historical named entities in the historical text fragment with placeholders corresponding to historical entity attributes of the historical named entities in the historical text fragment, and the placeholders corresponding to the historical entity attributes are used for filling the named entities of the historical entity attributes; filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating a medical record text of the patient according to at least one target text segment.
In a third aspect, an apparatus for obtaining a text template is shown, including: the medical condition monitoring system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a historical text segment in an existing real historical medical record text, and the historical text segment comprises historical named entities related to a medical condition and historical non-named entities except the historical named entities; the identification module is used for identifying the historical named entities in the historical text fragment and determining the historical entity attributes of the historical named entities; and the first generation module is used for replacing the historical named entities in the historical text fragments with the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments.
In a fourth aspect, an apparatus for generating medical record text is shown, including: a second obtaining module, configured to obtain inquiry information, where the inquiry information includes at least one target named entity of the patient related to the condition of the patient and a target entity attribute of each target named entity; the screening module is used for screening at least one target text template from the generated text templates according to the inquiry information, the text template is used for generating text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities; the generated text template comprises a text template corresponding to a history text fragment in an existing real history medical record text, wherein the history text fragment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity, the text template is obtained by replacing the history named entity in the history text fragment with a placeholder corresponding to a history entity attribute of the history named entity in the history text fragment, and the placeholder corresponding to the history entity attribute is used for filling the named entity of the history entity attribute; the filling module is used for filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and the second generation module is used for generating the medical record text of the patient according to at least one target text segment.
In a fifth aspect, the present application illustrates an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform a method as shown in any of the preceding aspects.
In a sixth aspect, the present application illustrates a non-transitory computer readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform a method as in any one of the preceding aspects.
In a seventh aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method according to any of the preceding aspects.
Compared with the prior art, the method has the following advantages:
in the application, a history text segment in an existing real history medical record text can be acquired, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity; identifying historical named entities in the historical text fragments, and determining historical entity attributes of the historical named entities; and replacing the historical named entities in the historical text fragments by using the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments. The generated text template is deployed in the electronic device, so that the electronic device can generate medical record text of the patient by means of the text template and the keywords of the patient condition.
In this way, when the medical record text of the patient needs to be generated according to the keywords of the patient condition, the medical record text of the patient can be generated according to the keywords of the patient condition by means of the text template, for example, inquiry information can be obtained, and the inquiry information includes at least one target named entity of the patient related to the patient condition and target entity attributes of the target named entities; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text templates are used for generating text fragments related to medical record texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of each target named entity; filling each target named entity in each place-holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place-holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating medical record text of the patient according to the at least one target text segment.
Through this application, on the one hand, can be based on the automatic medical record text that generates the patient of text template, so can not need the manual case history text that writes the patient of medical staff, thereby can not be made by medical staff's typing skill or level, and because the speed that generates patient's medical record text based on text template is often higher than the manual speed of writing patient's medical record text of medical staff, so, not only can improve the speed that obtains patient's medical record text, can also liberate medical staff's labour, so, can improve the efficiency that obtains patient's medical record text, and, can reduce the degree that influences medical staff's normal work. On the other hand, the text template has no intelligence and divergence, the expressions in the text template are controllable, for example, the expressions in the text template do not change spontaneously after the setting is successful, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template do not change spontaneously after the setting is successful, and the expressions in the text template can be set as the expressions according with the filling mode of the medical record texts according to the actual situation, so that the possibility that redundant information exists in the generated medical record texts of the patients can be reduced, and the related contents of part of keywords missing in the generated medical record texts of the patients can be avoided.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for obtaining a text template according to the present application.
Fig. 2 is an exemplary diagram of obtaining a text template according to the present application.
FIG. 3 is a flow chart of the steps of a method of obtaining a text template of the present application.
FIG. 4 is a flow chart of steps of a method of obtaining a historical text segment of the present application.
FIG. 5 is a flow chart of steps of a method of generating text for medical records according to the present application.
FIG. 6 is a flow chart of steps of a method of screening text templates according to the present application.
FIG. 7 is a flow chart of steps of a method of generating a target text segment of the present application.
FIG. 8 is a flow chart of steps of a method of generating text for medical records according to the present application.
Fig. 9 is a block diagram of an apparatus for acquiring a text template according to the present application.
Fig. 10 is a block diagram showing a structure of an apparatus for generating a medical record text according to the present application.
Fig. 11 is a block diagram of a device of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Currently, most medical institutions are equipped with electronic medical record systems, so that medical staff can directly and manually write (for example, write by keyboard typing and the like) medical record texts of patients in the electronic medical record systems, and a great deal of time is saved for the medical staff to manually write the medical record texts.
However, by observing statistics of how medical personnel manually compose text of a patient's medical record in an electronic medical record system, it can be found that: most medical staff manually write medical record texts of patients in an electronic medical record system at a low speed and with long time consumption, so that the medical record texts of the patients are obtained at a low efficiency, and the normal work of the medical staff is seriously influenced.
Therefore, a need has arisen to improve the efficiency of obtaining patient medical history text. In order to improve the efficiency of obtaining the medical record text of the patient, through the reason analysis of the reason that the speed of manually writing the medical record text of the patient in the electronic medical record system by most medical staff is slow and takes long time, the following can be found: most medical personnel are not professional typists, and most medical personnel have low typing skills or levels, resulting in slow typing speeds, which in turn results in slow and time consuming manual writing of patient medical record text in an electronic medical record system. In addition, it can be found that: because the medical staff is busy at ordinary times, the typing skill or level is difficult to train actively and have time to train, the typing skill or level of the medical staff cannot be improved quickly in a short period, that is, the speed of the medical staff writing the medical record text of the patient manually in the electronic medical record system cannot be improved quickly in a short period.
As such, it is often impractical or difficult to increase the speed at which medical personnel can manually write medical record text for a patient in an electronic medical record system by increasing the typing skills or level of the medical personnel.
In view of this, the mode of "medical staff manually writes the case history text of the patient in the electronic case history system" is abandoned, and the mode of automatically generating the case history text of the patient is adopted, so that the mode of automatically generating the case history text of the patient can avoid the need of the medical staff manually writing the case history text of the patient in the electronic case history system, thereby being free from the typing skills or level of the medical staff, and because the rate of automatically generating the case history text of the patient is often higher than the rate of manually writing the case history text of the patient by the medical staff, so that the speed of obtaining the case history text of the patient can be improved, the labor force of the medical staff can be liberated, thus, the efficiency of obtaining the case history text of the patient can be improved, and the degree of influencing the normal work of the medical staff can be reduced. For example, in the process of inquiring the patient, the medical staff may ask the patient's condition, for example, the patient has a fever for three days or the patient starts to cough in 2 months and 1 days, etc., and in order to improve the efficiency, the medical staff may record keywords of the patient's condition in the electronic medical record system, for example, keywords such as "fever" and "three days", or keywords such as "2 months and 1 days" and "cough", etc.
The electronic medical record system can then automatically generate a patient medical record text based on keywords of the patient's condition recorded by medical personnel in the electronic medical record system, for example, the trained seq2seq (Sequence to Sequence) model can be used to generate the patient medical record text, and so on. Specifically, the seq2seq model can be built in the electronic medical record system in advance, the electronic medical record system can input the keywords of the patient's condition into the seq2seq model, so that the seq2seq model generates the medical record text of the patient according to the keywords of the patient's condition and outputs the medical record text of the patient, and the electronic medical record system can acquire the medical record text of the patient output by the seq2seq model.
However, after generating a large number of patient medical history texts using the trained seq2seq model, it was found that: on one hand, by checking, counting, analyzing and the like of a large amount of generated medical record texts of patients, it can be found that: in the medical record text of the patient generated by using the seq2seq model according to the keywords of the patient's condition, there are many redundant information, and the redundant information includes contents which have very low or even no relation with the patient's condition, and thus, the contents in the generated medical record text of the patient are not concise, which may affect the efficiency of medical staff in reading the medical record text. On the other hand, by checking, comparing and analyzing the generated medical record text of the patient and the keywords of the patient's disease condition, it can be found that: sometimes, in the medical record text of the patient generated by using the seq2seq model according to the keywords of the patient's condition, the related content of a part of the keywords in the patient's condition is not included, so that the related content of the part of the keywords is lost, and thus, the generated medical record text of the patient is incomplete, which may affect the accuracy of knowing the patient's condition according to the medical record text, and further may cause subsequent medical disputes.
Therefore, a need has arisen to reduce redundant information in the generated medical record text of the patient and avoid the related content of the missing part of the keywords in the generated medical record text of the patient. In order to achieve the purposes of reducing redundant information in a generated medical record text of a patient and avoiding missing related contents of partial keywords in the generated medical record text of the patient, the following conclusions can be obtained by performing statistical analysis on the reason that the redundant information and the missing related contents of partial keywords exist in the medical record text of the patient generated according to the keywords of the patient condition by using a seq2seq model and analyzing the characteristics of the seq2seq model:
the seq2seq model comprises an encoder layer and a decoder layer, wherein the encoder layer is responsible for encoding keywords of the patient condition into feature vectors, and the decoder layer is responsible for translating the feature vectors into texts so as to obtain medical record texts of the patient. In terms of text generation, the generation strategy of the seq2seq model is essentially a black box generation strategy, and even though the seq2seq model is trained by a large amount of training data, the generation strategy of the seq2seq model for generating the text cannot be limited, and the seq2seq model has intelligence, so that the seq2seq model has inherent characteristics of intelligently (divergently) generating the text, and further the generated medical history text of the patient has redundant information. In addition, in the process of translating the feature vector into the text, the decoder layer may cause conditions such as translation error or missing translation, and the generated medical record text of the patient lacks the related content of a part of keywords.
As described above, the present application contemplates that the medical history text of the patient is generated from the keywords of the medical condition of the patient without using the seq2seq model, and that the medical history text of the patient is generated from the keywords of the medical condition of the patient by using another model, for example, by using another type of neural network model, but it has been found through experiments that the generation strategy for the other type of model is also a black box generation strategy per se in terms of the generated text, and even if it is trained with a large amount of training data, the generation strategy for the generated text cannot be limited, and similarly, the other type of model is intelligent, so that the other type of model itself has an inherent characteristic of being able to generate the text intelligently (divergently), and further, redundant information exists in the medical history text of the patient generated using the other type of model. In addition, in the process of translating the obtained feature vector into a text, other models also have the situations of wrong translation, missing translation and the like, so that the generated medical history text of the patient lacks the related content of part of keywords.
In view of this, for the purpose of "reducing redundant information in the generated medical record text of the patient and avoiding missing relevant contents of part of keywords in the generated medical record text of the patient", the present application abandons a method of generating the medical record text of the patient according to the keywords of the patient's condition using a model, and considers that a method of limiting a generation policy of the generated text and a method of abandoning "translating feature vectors into text" are required. To be able to limit the generation strategy for generating text and to forego "translating feature vectors into text", the present application contemplates using text templates to generate patient medical history text from keywords of the patient's condition.
The text template includes a sentence template and the like, the text template includes some texts and placeholders, and the placeholders in the text template are used for filling corresponding words, for example, for filling keywords of the illness state of the patient and the like. For example, keywords of a patient condition may be obtained first, then at least one text template for filling in the keywords is selected from a large number of text templates prepared in advance, then the keywords to be filled in are respectively filled in the place-occupying Fu Zhongfen in the at least one text template to obtain at least one text segment with the keywords filled in, and then a medical record text of the patient is generated according to the at least one text segment.
The text template has no intelligence and divergence, expressions in the text template are controllable, for example, the expressions in the text template cannot change spontaneously after the text template is successfully set, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template cannot change spontaneously after the text template is successfully set, and the expressions in the text template can be set as expressions according with a medical record text filling mode according to actual conditions, so that the possibility that redundant information exists in the generated medical record text of the patient can be reduced, and the related content that part of keywords are missing in the generated medical record text of the patient can be avoided.
Specifically, referring to fig. 1, a method for acquiring a text template according to the present application is shown, and the method is applied to an electronic device, where the electronic device includes a terminal or a server. The terminal may include a desktop computer, a notebook computer, a tablet computer, a mobile phone, or the like. For example, the terminal may be a terminal used by medical personnel, or the like. The server can comprise a cloud and the like. For example, the terminal may be a server or the like corresponding to a terminal used by medical staff. Wherein, the method comprises the following steps:
in step S101, a history text segment in the existing real history medical record text is acquired, wherein the history text segment includes a history named entity related to the medical condition and a history non-named entity except the history named entity.
In one embodiment, the history text segment comprises two parts of contents, one part is a history named entity, and the other part except the history named entity is a history non-named entity.
In the present application, the existing real history case history texts include: medical records text of patients manually written by medical personnel in an electronic medical record system during the history process, and the like. The medical staff often expresses the patient's medical record text written manually in the electronic medical record system in a manner that accords with the clinical medical record text.
The historical text segments in the existing real historical medical record text comprise: the text segments selected from the medical record texts of the patients manually written in the electronic medical record system during the history process by the medical staff, for example, the text segments selected manually, and the text segments selected manually are often more standard and more comprehensive in the overall expression mode.
In one possible embodiment, one history medical record text can include a plurality of different history text segments. Often, a historical text fragment includes historical named entities associated with the condition, and also includes historical non-named entities. The historical named entities related to the disease condition include nouns or noun phrases, etc. related to the disease condition, or words used to describe the condition, etc. Historical non-named entities include words other than the historical named entities associated with the condition, and the like.
The historical named entities associated with the disease are illustrated as an example, but not as a limitation on the scope of the present application. Historical named entities associated with a disease condition may include: words for describing clinical manifestations of the condition, words for describing the time of initiation of the condition, words for describing the predisposition for occurrence of the condition, words for describing the severity of the condition, words for describing the site of the onset of the condition, words for describing the location of a particular onset in the site of the onset of the condition, words for describing the particular experience of the patient with the condition, words for describing the particular manifestations of the condition, words for describing the distribution and hierarchical characteristics of the condition, words for describing the characteristics of the onset of the condition, words for describing the frequency of the onset of the condition, words for describing the single duration of the onset of the condition, words for describing the causative factors of the condition, words for describing the exacerbating factors of the condition, words for describing the mitigating factors of the condition, and the like. It should be noted that the historical named entity related to the disease condition may also include other words that may be needed according to the actual situation, which is not limited herein.
For example, in one example, one of the historical medical record texts includes: "the patient had fever and headache three days ago". Where "three days" is the vocabulary used to describe the time of initiation of the condition and "fever" and "headache" are the vocabulary used to describe the clinical manifestations of the condition. Thus, the historical named entities associated with the condition in the historical text fragment "fever and headache in patients occurred three days ago" may include: three days, fever, headache, etc. Accordingly, historical non-named entities include: "patient", "before", "present" and ".
In step S102, historical named entities in the historical text segment are identified, and historical entity attributes of the historical named entities are determined.
In the present application, a NER (Named Entity Recognition) model based on medical record text can be used to identify historical Named entities related to medical conditions in the historical text segment and historical Entity attributes of the historical Named entities.
The NER model based on medical history text can be trained in advance, and the like. For example, at least one training text may be obtained, where the training text includes a sample text and a label text, the sample text includes a text segment in an existing real medical record text, and the label text may be a named entity labeled in the text segment in the existing real medical record text and an entity attribute of the labeled named entity, and the like. The actual medical record text already existing in the sample text may be different from the history medical record text in step S101. The initialized NER model can then be trained using at least one training text until parameters in the NER model converge, resulting in a case history text-based NER model, and so on.
Thus, in this step, the history text segment may be input into the NER model based on medical record text, so that the NER model based on medical record text identifies the history named entities related to the medical condition and the history entity attributes of the history named entities in the history text segment, and outputs the history named entities related to the medical condition and the history entity attributes of the history named entities in the history text segment. Thereafter, the electronic device can obtain historical named entities related to the medical condition and historical entity attributes of the historical named entities in the historical text segment output by the NER model based on the medical record text.
For example, assume that one of the historical text segments in the medical history text comprises: "fever and headache of a patient three days ago", wherein the historical named entities associated with the disease condition include: the historical entity attribute of the historical named entity of three days can be 'initiation time', the historical entity attribute of the historical named entity of three days can be 'clinical performance', and the historical entity attribute of the historical named entity of headache can be 'clinical performance', etc.
In step S103, the placeholder corresponding to the attribute of the historical entity is used to replace the historical named entity in the historical text fragment, so as to obtain the text template corresponding to the historical text fragment.
In one example, assuming that the historical text segment includes one historical named entity related to the medical condition, the placeholder corresponding to the historical entity attribute of the one historical named entity related to the medical condition may be used to replace the one historical named entity in the historical text segment, resulting in a text template corresponding to the historical text segment.
In the text template corresponding to the historical text fragment, the placeholder corresponding to the historical entity attribute of the historical named entity related to the illness condition is used for filling out the named text of the historical entity attribute.
The text template corresponding to the historical text fragment is provided with historical non-named entities and placeholders corresponding to historical entity attributes of the historical named entity related to the illness state, the relative position of the placeholder corresponding to the historical entity attributes of the historical named entity related to the illness state in the text template is the same as the relative position of the historical named entity related to the illness state in the historical text fragment, and the relative position of the historical non-named entities in the text template is the same as the relative position of the historical non-named entities in the historical text fragment.
Or, in another example, assuming that the history text segment includes more than two history named entities related to the disease condition, the placeholders corresponding to the attributes of the history entities of the history named entities related to the disease condition may be respectively used to replace the corresponding history named entities in the history text segment, so as to obtain the text templates corresponding to the history text segment.
In the text template corresponding to the historical text fragment, the placeholders corresponding to the historical entity attributes of the historical named entities related to the illness state are respectively used for filling the named texts of the corresponding historical entity attributes.
The text templates corresponding to the historical text segments are provided with historical non-named entities and placeholders corresponding to historical entity attributes of the historical named entities relevant to the illness state, the relative positions of the placeholders corresponding to the historical entity attributes of the historical named entities relevant to the illness state in the text templates are the same as the relative positions of the historical named entities relevant to the illness state in the historical text segments, and the relative positions of the historical non-named entities in the text templates are the same as the relative positions of the historical non-named entities in the historical text segments.
In one example, referring to fig. 2, for example, assume that one of the history text segments in the medical record text comprises: "the patient had fever and headache three days ago". Wherein the historical named entities associated with the condition include: three days, fever, headache, etc. The historical entity attribute for the historical named entity of "three days" may be "time to initiate", the historical entity attribute for the historical named entity of "fever" may be "clinical performance", and the historical entity attribute for the historical named entity of "headache" may be "clinical performance", etc. The placeholder corresponding to the historical entity attribute 'initiation time' is 'initiation time', and the placeholder corresponding to the historical entity attribute 'clinical manifestation' is 'clinical manifestation'.
As such, the historical named entity "three days" in "fever and headache occurred by the patient three days ago may be replaced with the placeholder" [ issue time ] "corresponding to the historical entity attribute" issue time ", the historical named entity" three days "in" fever and headache occurred by the patient three days ago may be replaced with the placeholder "[ clinical manifestation ]" corresponding to the historical entity attribute "clinical manifestation", and the historical named entity "headache" in "fever and headache occurred by the patient three days ago may be replaced with the historical entity attribute" [ clinical manifestation ] "corresponding to the historical entity attribute" clinical manifestation ", resulting in a text template corresponding to the historical text fragment" fever and headache occurred by the patient three days ago ": "patients appeared [ clinical manifestations ] and [ clinical manifestations ] before [ initiation time ]".
After obtaining the text templates corresponding to the history text segments in the existing real history medical record text, the generated text templates may be deployed in the electronic device, so that the electronic device may generate the medical record text of the patient by using the text templates and the keywords of the medical condition of the patient later, for example, one text segment of the medical record text of the patient is generated, the one text segment may be used as the medical record text of the patient, or two or more text segments of the medical record text of the patient are generated, and the two or more text segments may be combined into the medical record text of the patient. The specific way of generating the medical record text of the patient can be seen in the embodiment shown in fig. 4, which will not be described in detail herein.
In the application, a history text segment in an existing real history medical record text can be acquired, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity; identifying historical named entities in the historical text fragments, and determining historical entity attributes of the historical named entities; and replacing the historical named entities in the historical text fragments by using the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments. The generated text template is deployed in the electronic device, so that the electronic device can generate medical record text of the patient by means of the text template and the keywords of the patient condition.
In this way, when the medical record text of the patient needs to be generated according to the keywords of the patient condition, the medical record text of the patient can be generated according to the keywords of the patient condition by means of the text template, for example, inquiry information can be obtained, and the inquiry information includes at least one target named entity of the patient related to the patient condition and target entity attributes of each target named entity; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text templates are used for generating text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities; filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating medical record text of the patient according to the at least one target text segment.
Through this application, on the one hand, can be based on the automatic medical record text that generates the patient of text template, so can not need the manual case history text that writes the patient of medical staff, thereby can not be made by medical staff's typing skill or level, and because the speed that generates patient's medical record text based on text template is often higher than the manual speed of writing patient's medical record text of medical staff, so, not only can improve the speed that obtains patient's medical record text, can also liberate medical staff's labour, so, can improve the efficiency that obtains patient's medical record text, and, can reduce the degree that influences medical staff's normal work. On the other hand, the text template has no intelligence and divergence, the expressions in the text template are controllable, for example, the expressions in the text template do not change spontaneously after the setting is successful, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template do not change spontaneously after the setting is successful, and the expressions in the text template can be set as the expressions according with the filling mode of the medical record texts according to the actual situation, so that the possibility that redundant information exists in the generated medical record texts of the patients can be reduced, and the related contents of part of keywords missing in the generated medical record texts of the patients can be avoided.
However, in some cases, the existing real history medical record text in step S101 is a plurality of history medical record texts, for example, a large number of history medical record texts, and each history medical record text includes a large number of history text segments, so that after the above-mentioned processes of step S101 to step S103 are respectively performed on each history text segment, a text template corresponding to each history text segment can be obtained, and as a result, because of the large number of history text segments, a large number of text templates are obtained.
After a large number of text templates are deployed in the electronic device, a large amount of storage space of the electronic device is occupied.
In addition, because the existing real history medical record text is often the medical record text of the patient manually written by the medical staff in the electronic medical record system, and the expression mode of the medical record text of the patient manually written by the medical staff in the electronic medical record system is often in accordance with the expression mode of the clinical medical record text, the history text segments with the same semantic meaning are often present in the history text segments in different history medical record texts, and further, the semantic meanings of the text templates respectively corresponding to the history text segments with the same semantic meaning are often the same.
For example, assume that one historical text segment is "patient develops fever and headache three days ago", and another historical text segment is "patient starts fever and headache 3 days ago", and the semantics of the two historical text segments are the same.
The text templates for the historical text segment "patient had fever and headache three days ago" correspond to "patient had clinical manifestations ] and" clinical manifestations "before [ initiation time ], the historical text segment" patient had fever and headache 3 days ago "correspond to" patient had clinical manifestations ] and "clinical manifestations" before [ initiation time ], and the semantics of the two text templates are the same.
Therefore, in a scene that the electronic device needs to generate a medical record text, when a text template to be used needs to be searched in the deployed text templates, the searching range is large, and the searching efficiency is low.
Therefore, in order to save the storage space of the electronic device and improve the efficiency of searching for the text template to be used in the deployed text templates in the scene that the electronic device needs to generate the medical record text later, more than two text templates with the same semantic meaning can be deduplicated to reserve one text template of the more than two text templates with the same semantic meaning, and the effect of simplifying the text templates deployed in the electronic device is achieved.
Therefore, under the condition that the text template required to be used is searched in the deployed text template, the text template required to be used can be searched in fewer text templates, so that the searching range can be reduced, the searching speed is increased, the searching efficiency is increased, the efficiency of generating the medical record text can be increased, and the like.
Specifically, the generated text templates are multiple, and each text template is generated according to each history text segment in each history medical record text, so in another embodiment of the present application, referring to fig. 3, after step S103, the method may further include:
in step S201, at least two text templates having the same semantic meaning are determined as one text template group among the plurality of text templates.
In one embodiment, a plurality of text template sets may be obtained, and step S202 may be performed separately for each text template set.
The semantic similarity between every two text templates in the plurality of text templates can be obtained, the two text templates with the semantic similarity larger than the preset similarity are used as text templates with the same semantic, and the text templates with the same semantic are determined as a text template group. The preset similarity may be determined according to actual situations, and the present application is not limited thereto.
In one embodiment, when obtaining semantic similarity between two text templates, the semantic similarity between the two text templates may be obtained using a currently existing approach. For example, cosine similarity or edit distance between two text templates may be acquired as semantic similarity between the two text templates.
The cosine similarity includes cosine similarity based on word2vec (word to vector), and the like.
Alternatively, in another embodiment, the Semantic similarity between two text templates and the like may be obtained based on DSSM (Deep Structured Semantic Model, deep web-based Semantic Model) and the like.
In step S202, at least two text templates of the set of text templates are de-duplicated to leave one text template among the at least two text templates of the set of text templates.
For example, for any one text template group, in each text template group (including more than two text templates) with the same semantic meaning in the text template group, one text template may be retained, and the other text templates may be removed. As to which text template in the text template group to reserve, the electronic device may select at its own discretion, for example, randomly select or select the text template with the most placeholders, or select the text template with the highest occurrence frequency, or the like, or manually select by a worker, or the like. The same is true for each of the other text template sets.
Further, after the step S202 is performed separately for each text template group, the remaining text templates may be combined into a template library or the like. In addition, a new text template can be added or a text template which is not required to be used can be deleted in the template library according to actual requirements.
Or, in order to save a storage space of the electronic device, and in order to improve efficiency of searching a text template to be used in a deployed text template in a scene that the electronic device needs to generate a medical record text later, in another embodiment of the present application, referring to fig. 4, when obtaining a history text segment in an existing real history medical record text, the following process may be implemented, including:
in step S301, a plurality of original text segments in the existing real history medical record text are acquired.
And obtaining each original text segment in each history medical record text. The original text segment in the history medical record text comprises all the text segments in the history medical record text and the like.
In step S302, at least two original text segments with the same semantic meaning in the plurality of original text segments are determined as a text segment group.
In one embodiment, a plurality of text segment groups may be obtained, and step S303 may be performed separately for each text segment group.
The semantic similarity between every two original text fragments in the multiple original text fragments can be obtained, the two original text fragments with the semantic similarity larger than the preset similarity are used as original text fragments with the same semantic, and the original text fragments with the same semantic are determined to be a text fragment group.
The preset similarity may be determined according to actual situations, and the present application is not limited thereto.
In one embodiment, when obtaining the semantic similarity between two original text fragments, the semantic similarity between the two original text fragments may be obtained using a currently existing manner. For example, a cosine similarity (e.g., a cosine similarity based on word2 vec) or an edit distance between two original text segments may be obtained as the semantic similarity between the two original text segments. Alternatively, in another embodiment, the semantic similarity between two original text segments, etc. may be obtained based on DSSM, etc.
In step S303, at least two original text segments in the text segment group are deduplicated to leave one original text segment among the at least two original text segments in the text segment group.
For any text segment group, in the text segment group (including more than two original text segments), one original text segment in the original text group may be retained, and other original text segments may be removed. As to which original text fragment in the text fragment group to keep, the electronic device may select at its own discretion, for example, randomly, or select one original text fragment with the most placeholders, or select one original text fragment with the highest frequency of occurrence, etc., or manually by a worker, etc. The same is true for each of the other text segment groups.
In step S304, the original text segment remaining in each text segment group is determined as a history text segment.
According to the embodiment, more than two original text fragment boards with the same semantic meaning can be repeated firstly, so that one original text fragment of the more than two original text fragments with the same semantic meaning is reserved, the effect of simplifying the original text fragment of the existing real historical case history text is achieved, then the text template corresponding to each of the remaining original text fragments is generated, and the text template is deployed in the electronic equipment, which is equivalent to the effect of indirectly simplifying the text template deployed in the electronic equipment. Therefore, under the condition that the text template required to be used is searched in the deployed text template, the text template required to be used can be searched in fewer text templates, so that the searching range can be reduced, the searching speed is increased, the searching efficiency is increased, the efficiency of generating the medical record text can be increased, and the like.
In addition, referring to fig. 5, a method for generating a medical record text according to the present application is shown, and the method is applied to an electronic device, where the electronic device includes a terminal or a server. The terminal may include a desktop computer, a notebook computer, a tablet computer, a mobile phone, or the like. For example, the terminal may be a terminal used by medical personnel, or the like. The server can comprise a cloud and the like. For example, the terminal may be a server or the like corresponding to a terminal used by medical staff. Wherein, the method comprises the following steps:
in step S401, inquiry information is obtained, which includes at least one target named entity of the patient related to the medical condition and target entity attributes of each target named entity.
In the present application, the inquiry information may include inquiry information of the patient and the like. The interrogation information may be recorded directly in the electronic device by the medical staff during the interrogation of the patient, etc. The inquiry information may be in the form of an inquiry form, for example, the inquiry form includes a plurality of rows and a plurality of columns, each column in the first row records the entity attribute, each column in the second row and the row after the second row records the named entity related to the disease condition, and so on.
In the present application, for any one of the second row and the row located after the second row, the named entity recorded in the row and the entity attribute corresponding to the named entity recorded in the row in the first row may constitute one inquiry message, and the same holds for each of the second row and the other rows located after the second row.
In one example, the questionnaire form can be as shown in the following table.
Figure BDA0003854528550000121
Figure BDA0003854528550000131
In the above-mentioned inquiry form, the first row includes a plurality of entity attributes, and the second row and the third row record named entities of the patient related to the disease condition. The second row records the relevant case for neck pain and the third row records the relevant case for headache.
For example, in the second row, the clinical manifestations of the patients are recorded as "neck pain", the initiation time of the "neck pain" is "three days ago", the occurrence cause of the "neck pain" is "no cause", the attack site of the "neck pain" is "neck", and the specific attack position is "right side" (i.e., right side of neck, etc.). In addition, the named entities of the patient corresponding to the entity attributes such as "severity" and "specific feeling" are not recorded. For another example, in the third row, it is recorded that the clinical manifestations of the patient are "headache", "the onset time of the neck pain" is "three days before", "the cause of occurrence of the headache" is "no cause", "the severity of the headache" is "severe", "the attack site of the headache" is "head", and in addition, named entities corresponding to the entity attributes of the patient, such as "specific attack location" and "specific feeling", are not recorded.
Wherein "\\" indicates that no named entity is recorded. The named entities recorded in the second row and the entity attributes corresponding to the named entities recorded in the second row in the first row may be regarded as one inquiry message, and the named entities recorded in the third row and the entity attributes corresponding to the named entities recorded in the third row in the first row may be regarded as one inquiry message.
In step S402, at least one target text template is screened from the generated text templates according to the inquiry information, where the text template is used to generate text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template include target entity attributes of each target named entity.
The generated text template comprises a text template corresponding to a history text fragment in an existing real history medical record text, the history text fragment comprises a history named entity related to the disease condition and a history non-named entity except the history named entity, the text template is obtained by replacing the history named entity in the history text fragment with a placeholder corresponding to the history entity attribute of the history named entity in the history text fragment, and the placeholder corresponding to the history entity attribute is used for filling the named entity of the history entity attribute.
The specific generation manner of the text template can be referred to the above embodiments shown in fig. 1-3, and will not be described in detail here.
The purpose of the step is that the entity attributes corresponding to the placeholders in the screened at least one target text template comprise the target entity attributes of each target named entity, so that each target named entity can be respectively filled in the placeholder in one of the target text templates, each target named entity is respectively located in one of the text segments of the obtained medical history text, and the subsequent generation of the medical history text is facilitated.
The step can be referred to the embodiment shown in fig. 5, and will not be described in detail here.
In step S403, according to the entity attribute corresponding to each placeholder in the at least one target text template and the target entity attribute of each target named entity, filling each target named entity in each placeholder Fu Zhongfen in the at least one target text template to obtain at least one target text fragment corresponding to the at least one target text template.
In an embodiment of the present application, for any placeholder in the target text template, a target named entity matching between the attribute of the target entity and the entity attribute corresponding to the placeholder may be searched in a target named entity that has not been filled in the placeholder in the inquiry information in at least one target text template, and the searched target named entity is filled in the placeholder. The same is true for each of the other placeholders in the target text template.
In step S404, a medical record text of the patient is generated according to the at least one target text segment.
In an embodiment of the present application, in a case that there is one obtained target text segment, the obtained one obtained target text segment may be used as a medical record text of the patient. Alternatively, in another embodiment of the present application, when the number of the obtained target text segments is two or more, the two or more target text segments may be combined into the medical record text of the patient.
In the present application, when a medical record text of a patient needs to be generated according to keywords of a patient's medical condition, the medical record text of the patient may be generated according to the keywords of the patient's medical condition by means of a text template, for example, inquiry information may be obtained, where the inquiry information includes at least one target named entity of the patient related to the medical condition and target entity attributes of the target named entities; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text templates are used for generating text fragments related to medical record texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of each target named entity; filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating medical record text of the patient according to the at least one target text segment.
Through this application, on the one hand, can be based on the automatic medical record text that generates the patient of text template, so can not need the manual case history text that writes the patient of medical staff, thereby can not be made by medical staff's typing skill or level, and because the speed that generates patient's medical record text based on text template is often higher than the manual speed of writing patient's medical record text of medical staff, so, not only can improve the speed that obtains patient's medical record text, can also liberate medical staff's labour, so, can improve the efficiency that obtains patient's medical record text, and, can reduce the degree that influences medical staff's normal work. On the other hand, the text template has no intelligence and divergence, the expressions in the text template are controllable, for example, the expressions in the text template do not change spontaneously after the setting is successful, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template do not change spontaneously after the setting is successful, and the expressions in the text template can be set as the expressions according with the filling mode of the medical record texts according to the actual situation, so that the possibility that redundant information exists in the generated medical record texts of the patients can be reduced, and the related contents of part of keywords missing in the generated medical record texts of the patients can be avoided.
In another embodiment of the present application, referring to fig. 6, step S402 includes:
in step S501, in the generated text templates, the entity attribute corresponding to the placeholder included in the screening is one target text template that is a subset of the target entity attribute in the inquiry information.
Each generated text template comprises at least one placeholder, each placeholder corresponds to one entity attribute, and each target named entity in the inquiry information has respective target entity attribute.
For any one of the generated text templates, it may be determined whether the entity attribute corresponding to the placeholder included in the text template is a subset of the target entity attribute in the inquiry information. If the entity attribute corresponding to the placeholder included in the text template is the subset of the target entity attribute in the inquiry information, the text template is qualified as the target text template, and the text template can be used as a candidate text template, for example, the text template of which the entity attribute corresponding to the included placeholder is the subset of the target entity attribute in the inquiry information is determined as the candidate text template. In the case that there is one candidate text template, the candidate text template may be determined as a target text template; or, under the condition that the candidate text templates are multiple, screening one candidate text template with the largest intersection between the entity attribute corresponding to the placeholder and the target entity attribute in the inquiry information from the multiple candidate text templates, and determining the screened candidate text template as a target text template. Or, if the entity attribute corresponding to the placeholder included in the text template is not the subset of the target entity attribute in the inquiry information, the text template does not qualify as the target text template, and the text template may not be used as the candidate text template. The above operation is also performed for each of the other generated text templates. Thereby obtaining at least one candidate text template.
Further, if the rest target entity attributes except the entity attributes corresponding to the placeholders in the screened target text template do not exist in the inquiry information, the process is ended. Or, if the rest target entity attributes except the entity attributes corresponding to the placeholders in the screened target text template exist in the inquiry information, executing step S502.
In step S502, if the inquiry information further includes remaining target entity attributes other than the entity attribute corresponding to the placeholder in the screened target text template, a target text template whose entity attribute corresponding to the placeholder is a subset of the remaining target entity attributes is screened from the text templates that have not been screened as target text templates in the generated text templates, and so on until each target entity attribute in the inquiry information is respectively matched with the entity attribute corresponding to a placeholder in one of the screened target text templates.
For any one of the text templates that have not been filtered as the target text template among the generated text templates, it may be determined whether the entity attribute corresponding to the placeholder included in the text template is a subset of the remaining target entity attributes. If the entity attribute corresponding to the placeholder included in the text template is the subset of the remaining target entity attributes, the text template qualifies as a target text template, and the text template can be used as a candidate text template. For example, the entity attributes corresponding to the included placeholders, which are text templates of the subset of the remaining target entity attributes in the inquiry information, are determined as candidate text templates. In the case that there is one candidate text template, the candidate text template may be determined as a target text template; or, under the condition that the candidate text templates are multiple, screening one candidate text template with the largest intersection between the entity attribute corresponding to the placeholder and the remaining target entity attribute from the multiple candidate text templates, and determining the screened candidate text template as a target text template. Or, if the entity attribute corresponding to the placeholder included in the text template is not the subset of the remaining target entity attributes, the text template does not qualify as the target text template, and the text template may not be used as the candidate text template. The above-described operation is also performed for each of the other text templates that have not been screened as the target text template among the generated text templates. Thereby obtaining at least one candidate text template.
Further, if the rest target entity attributes except the entity attributes corresponding to the placeholders in the screened target text template do not exist in the inquiry information, the process is ended.
Or, if the inquiry information includes the remaining target entity attributes except the entity attributes corresponding to the placeholders in the screened target text template, step S502 is executed again.
In an embodiment of the present application, in the process of generating the text template in the embodiments shown in fig. 1 to 3, the historical entity attributes corresponding to the historical named entities in the identified historical text snippets are the same as various target entity attributes that may appear in the inquiry information, so that each target entity attribute that may appear in the inquiry information is the same as an entity attribute corresponding to at least one placeholder in the generated text template.
For example, assume that the attributes of the target entities that may appear in the interrogation information include: clinical presentation, initiation time, induction, severity, attack site, specific attack location, specific experience, specific presentation, distribution and level characteristics, attack frequency, single duration, induction factors, exacerbation factors, mitigation factors, and the like.
And in the embodiment shown in fig. 1-3, in the process of generating the text template, the identified historical named entities in the historical text segment also include: clinical presentation, initiation time, induction, severity, attack site, specific attack location, specific experience, specific presentation, distribution and level characteristics, attack frequency, single duration, induction factors, exacerbation factors, mitigation factors, and the like. And the entity attributes corresponding to the placeholders in the generated text templates respectively may include: clinical presentation, initiation time, induction, severity, attack site, specific attack location, specific experience, specific presentation, distribution and level characteristics, attack frequency, single duration, induction factors, exacerbation factors, mitigation factors, and the like.
In this way, each target entity attribute which may appear in the inquiry information is respectively the same as the historical entity attribute corresponding to at least one historical named entity in the historical text fragment identified in the process of generating the text template, so that each target entity attribute which may appear in the inquiry information is respectively the same as the entity attribute corresponding to at least one placeholder in the generated text template.
In this way, in step S403, for any placeholder in the target text template, a target named entity matching between the attribute of the target entity and the attribute of the entity corresponding to the placeholder may be searched in the target named entity that has not been filled in the placeholder in the inquiry information in at least one target text template, and the searched target named entity is filled in the placeholder. The same is true for each of the other placeholders in the target text template.
However, in some cases, in the process of generating the text template in the embodiment shown in fig. 1 to 3, the historical entity attributes corresponding to the historical named entities in the identified historical text segment are not uniformly the same as various target entity attributes that may appear in the inquiry information, so that each target entity attribute that may appear in the inquiry information is not respectively the same as the entity attribute corresponding to at least one placeholder in the generated text template.
For example, the historical entity attributes corresponding to the historical named entities in the historical text segment are identified by using the NER model, the inherent identification granularity of the NER model is relatively coarse, and the identification granularity of the NER model cannot be changed by the electronic device. This may result in: the target entity attributes that may appear in the inquiry information are not located in the historical entity attributes corresponding to the historical named entities in the historical text segments identified in the process of generating the text template. Assume that the attributes of the target entities that may appear in the interrogation information include: clinical manifestations, initiation time, occurrence cause, severity, attack site, specific attack location, specific feeling, specific manifestations, distribution and hierarchical characteristics, attack frequency, single duration, induction factors, exacerbation factors, and remission factors. The historical entity attributes corresponding to the historical named entities in the historical text segment which can be identified by using the NER model comprise the following steps: clinical presentation, time of initiation, cause, characteristics, location, presentation, severity, specific feelings, frequency of onset. As can be seen, there is clinical presentation, time of onset, severity, specific feelings and frequency of attacks in both. However, the historical entity attributes corresponding to the historical named entities in the historical text segment that can be identified using the NER model do not exist: occurrence cause, attack site, specific attack position, specific expression, distribution and hierarchical characteristics, attack characteristics, single duration, induction factors, aggravation factors, relief factors and the like.
There are no causes, features, locations, and manifestations in the attributes of the target entities that may appear in the interrogation information. That is, the target entity attributes that may appear in the inquiry information are not identical to the historical entity attributes corresponding to the historical named entities in the historical text segment that can be identified using the NER model. For example, one portion is the same and the other portion is different. For different parts, a historical entity attribute may be matched with some semantically identical target entity attributes, for example, a historical entity attribute may be a superordinate concept of some semantically identical target entity attributes, and the like.
For example, the historical entity attribute "incentive" may be matched against semantically identical target entity attributes "occurrence incentive", "inducement factor", "aggravation factor", and "inducement-mitigation factor", among others. As another example, the historical entity attribute "trait" may be matched against semantically identical target entity attributes "distribution and hierarchy trait" and "seizure trait". As another example, the historical entity attribute "location" may be matched against semantically identical target entity attributes "attack site" and "specific attack location". As another example, the historical entity attribute "representation" may be matched between the semantically identical target entity attributes "concrete" and "single duration".
In this case, in order to successfully fill one of the at least one target named entity in the inquiry information in each placeholder in the at least one target text template and achieve correct filling, in another embodiment of the present application, the target named entities in the inquiry information are multiple, and the positions of the respective target named entities in the inquiry information are in different order (the positions of the named entities in the inquiry information may be in order from left to right in a row in the inquiry form, etc.). The placeholders in the target text template are multiple, and the position sequence of each placeholder in the target text template is different.
Thus, referring to fig. 7, step S403 includes:
in step S601, for the placeholder with the position order of 1 st position in the target text template, in the target named entities which have not been filled in the placeholder in the inquiry information, the target named entity with the target entity attribute matching the entity attribute corresponding to the placeholder of 1 st position is searched, and the searched target named entity is written in the placeholder Fu Zhongtian of 1 st position.
In step S602, for a placeholder whose position order in the target text template is the nth place, among the target named entities in the inquiry information that have not been filled in the placeholder, a target named entity whose target entity attribute matches the entity attribute corresponding to the placeholder of the nth place and whose position order in the inquiry information matches the position order of the target named entity filled in the placeholder of the nth-1 place in the target text template in the inquiry information is closest to the position order of the target named entity in the inquiry information is searched, and the target named entity closest to the position order is written in the placeholder Fu Zhongtian of the nth place, where N is a positive integer greater than 1.
In the present application, a plurality of target named entities are provided in the inquiry information, and the position sequence of each target named entity in the inquiry information is different, and the position sequence of each target named entity in the inquiry information often coincides with the expression sequence or expression logic of the clinical medical record text, that is, it is necessary to match the position sequence of each target named entity in the inquiry information with the position sequence of each target named entity in the generated medical record text of the patient, for example, the earlier the position sequence of the target named entity in the inquiry information, the later the position sequence of the target named entity in the inquiry information, so that the generated medical record text of the patient coincides with the expression sequence or expression logic of the clinical medical record text for easy reading.
For this reason, for the placeholder whose position order in the target text template is the nth place, when searching for the target named entity to be filled in the placeholder from the target named entities not yet filled in the placeholder in the inquiry information, in addition to the requirement that the target entity attribute of the target named entity is matched with the entity attribute corresponding to the placeholder in the nth place, the distance between the position order of the target named entity in the inquiry information and the position order of the target named entity filled in the placeholder in the N-1 th place in the target text template in the inquiry information needs to be the closest.
For example, if there is one target named entity whose target entity attribute matches the entity attribute corresponding to the nth place holder, the target named entity whose target entity attribute matches the entity attribute corresponding to the nth place holder and whose distance between the position order in the inquiry information and the position order in the inquiry information of the target named entity filled in the nth-1 place holder in the target text template is the closest target named entity.
For another example, assuming that the number of target named entities whose target entity attributes match the entity attributes corresponding to the nth place holder is two or more, the distance between the position order of each of the two or more target named entities in the inquiry information and the position order of the target named entity filled in the nth-1 place holder in the target text template in the inquiry information is different, and the target named entity with the closest distance between the position order in the inquiry information and the position order of the target named entity filled in the nth-1 place holder in the target text template in the inquiry information may be selected from the two or more target named entities.
In addition, if there are a plurality of different target text templates, the flow from step S601 to step S602 may be executed for each target text template.
In this application, in some cases, the disease condition of the patient is complicated, a large number of named entities are present in the inquiry information of the patient, and then a large number of target text segments may be generated, so that the generated text medical record of the patient includes a large number of target text segments, that is, the generated text medical record of the patient has many contents and is not easy to read.
In this way, in order to make the generated text medical record of the patient more concise and easier to read, in an embodiment of the present application, the generated target text segments are multiple, referring to fig. 8, and step S404 may be implemented by the following process, including:
in step S701, it is determined whether at least two text fragments to be merged exist in the plurality of target text fragments, where the at least two text fragments to be merged have reference named entities, and the semantics of the contents of the text fragments to be merged, except the reference named entities, are the same, and the reference named entities are named entities corresponding to the same entity attribute but different in content.
For example, the inquiry information of the patient may be multiple, and the multiple inquiry information has repeated target entity attributes.
For any one target entity attribute in the plurality of inquiry messages, a target text segment of a target named entity with the target entity attribute can be screened from the plurality of target text segments, then the remaining segments of each target text segment except the target named entity with the target entity attribute in the target text segments are determined, namely, the remaining segments corresponding to each target text segment in the target text segments are obtained, and then whether the semantics of the remaining segments corresponding to each target text segment in the target text segments are the same or not is determined.
And under the condition that the semantemes of the rest fragments corresponding to the target text fragments are different pairwise, ending the operation on the target entity attribute, and starting to execute the operation on the other target entity attributes in the plurality of inquiry messages. Or, in the case that at least two remaining segments exist in the remaining segments respectively corresponding to each of the target text segments, the semantics of the at least two remaining segments are the same, the at least two remaining segments are used as a group of text segments to be merged. Then, the operation is finished on the target entity attribute, then, for another target entity attribute in the plurality of inquiry messages, a target text segment of a target named entity with another target entity attribute can be screened from the plurality of target text segments, then, the remaining segments except the target named entity with the target entity attribute in each target text segment in the target text segments are determined, namely, the remaining segments corresponding to each target text segment in the target text segments are obtained, and then, whether the semantics of the remaining segments corresponding to each target text segment in the target text segments are the same or not is determined. And analogizing in sequence until the above operation is completed for each target entity attribute in the plurality of inquiry messages, or until each target text segment in the plurality of target text segments is determined as a text segment to be merged.
In step S702, in the case that there are at least two text segments to be merged, the at least two text segments to be merged are merged into one merged text segment.
The text segment to be merged may be determined as a reference text segment to be merged in at least two text segments to be merged, the named entity of the same entity attribute may be determined in the text segments to be merged except for the text segment to be merged in the at least two text segments to be merged, and the named entity of the same entity attribute may be added after or before the named entity of the same entity attribute in the text segment to be merged in the reference text segment to be merged, and in the text segment to be merged in the reference text segment to be merged to which the named entity of the same entity attribute is added, consecutive named entities of the same entity attribute may be concatenated by punctuation, for example, consecutive named entities of the same entity attribute may be concatenated by a ton sign or a comma, and the like, thereby obtaining a merged text segment. Wherein, a plurality of groups of text segments to be merged may be obtained, each group of text segments to be merged includes more than two target text segments, and for each group of text segments to be merged, step 4042 may be performed respectively.
In step S703, a medical history text is generated according to the text segments other than the at least two text segments to be merged and the merged text segment in the plurality of target text segments.
For example, the text segments of the plurality of target text segments other than the at least two text segments to be merged and the merged text segment may be combined into a medical record text of the patient.
For example, text segments other than each group of text segments to be merged in the plurality of target text segments and merged text segments respectively obtained according to each group of text segments to be merged may be combined into a medical record text of the patient.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those of skill in the art will also appreciate that the embodiments described in the specification are exemplary of alternative embodiments and that the acts involved are not necessarily required of the application.
Referring to fig. 9, a block diagram of an apparatus for acquiring a text template of the present application is shown, including: the first acquisition module 11 is used for acquiring a history text segment in an existing real history medical record text, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity; the identification module 12 is used for identifying the historical named entities in the historical text segment and determining the historical entity attributes of the historical named entities; and the first generating module 13 is configured to replace the history named entity in the history text fragment with the placeholder corresponding to the history entity attribute to obtain the text template corresponding to the history text fragment.
In an optional implementation manner, a plurality of generated text templates are provided; the device still includes: the determining module is used for determining at least two text templates with the same semantic meaning as a text template group in the plurality of text templates; a deduplication module to deduplicate the at least two text templates of the text template set to retain one text template of the at least two text templates of the text template set.
In an optional implementation manner, the first obtaining module includes: the first acquisition unit is used for acquiring a plurality of original text segments in the historical medical record text; a first determining unit, configured to determine at least two original text fragments with the same semantic meaning in the plurality of original text fragments as a text fragment group; a deduplication unit, configured to deduplicate at least two original text segments in the text segment group to retain one original text segment among the at least two original text segments in the text segment group; a second obtaining unit, configured to deduplicate the at least two original text segments in the text segment group to retain one original text segment in the at least two original text segments in the text segment group.
In the application, a history text segment in an existing real history medical record text can be acquired, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity; identifying historical named entities in the historical text fragments, and determining historical entity attributes of the historical named entities; and replacing the historical named entities in the historical text fragments by using the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments. The generated text template is deployed in the electronic device, so that the electronic device can generate medical record text of the patient by means of the text template and the keywords of the patient condition.
In this way, when the medical record text of the patient needs to be generated according to the keywords of the patient condition, the medical record text of the patient can be generated according to the keywords of the patient condition by means of the text template, for example, inquiry information can be obtained, and the inquiry information includes at least one target named entity of the patient related to the patient condition and target entity attributes of each target named entity; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text templates are used for generating text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities; filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating medical record text of the patient according to the at least one target text segment.
Through this application, on the one hand, can be based on the automatic medical record text that generates the patient of text template, so can not need the manual case history text that writes the patient of medical staff, thereby can not be made by medical staff's typing skill or level, and because the speed that generates patient's medical record text based on text template is often higher than the manual speed of writing patient's medical record text of medical staff, so, not only can improve the speed that obtains patient's medical record text, can also liberate medical staff's labour, so, can improve the efficiency that obtains patient's medical record text, and, can reduce the degree that influences medical staff's normal work. On the other hand, the text template has no intelligence and divergence, the expressions in the text template are controllable, for example, the expressions in the text template do not change spontaneously after the text template is successfully set, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template do not change spontaneously after the text template is successfully set, and the expressions in the text template can be set as expressions according with a medical record text filling mode according to actual conditions, so that the possibility that redundant information exists in the generated medical record text of the patient can be reduced, and the related content that part of keywords are missing in the generated medical record text of the patient can be avoided.
Referring to fig. 10, a block diagram of an apparatus for generating a medical record text according to the present application is shown, including: a second obtaining module 21, configured to obtain inquiry information, where the inquiry information includes at least one target named entity of the patient related to the disease condition and a target entity attribute of each target named entity; a screening module 22, configured to screen at least one target text template from the generated text templates according to the inquiry information, where the text template is used to generate a text fragment related to a medical record text, and an entity attribute corresponding to a placeholder in the at least one target text template includes a target entity attribute of each target named entity; the generated text template comprises a text template corresponding to a history text fragment in an existing real history medical record text, wherein the history text fragment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity, the text template is obtained by replacing the history named entity in the history text fragment with a placeholder corresponding to a history entity attribute of the history named entity in the history text fragment, and the placeholder corresponding to the history entity attribute is used for filling the named entity of the history entity attribute; the filling module 23 is configured to fill each place holder Fu Zhongfen in the at least one target text template with each target named entity according to the entity attribute corresponding to each place holder in the at least one target text template and the target entity attribute of each target named entity, so as to obtain at least one target text fragment corresponding to the at least one target text template; and a second generating module 24, configured to generate a medical record text of the patient according to the at least one target text segment.
In an alternative implementation, the screening module includes: the first screening unit is used for screening a target text template of which the entity attribute corresponding to the placeholder is a subset of the target entity attribute in the inquiry information from the generated text template; and the second screening unit is used for screening a target text template of which the entity attribute corresponding to the placeholder is a subset of the rest target entity attributes in the text templates which are not screened as the target text templates in the generated text templates if the rest target entity attributes except the entity attribute corresponding to the placeholder in the screened target text template exist in the inquiry information, and so on until each target entity attribute in the inquiry information is respectively matched with the entity attribute corresponding to one placeholder in one screened target text template.
In an optional implementation manner, the first screening unit includes: a determining subunit, configured to determine, as a candidate text template, the entity attribute corresponding to the included placeholder, which is a text template of a subset of the target entity attribute in the inquiry information; the first obtaining subunit is configured to determine, when there is one candidate text template, the candidate text template as the target text template; or, the screening subunit is configured to, when the candidate text template is multiple, screen, in the multiple candidate text templates, one candidate text template with the highest intersection between the entity attribute corresponding to the placeholder included in the candidate text templates and the target entity attribute in the inquiry information, and the second obtaining subunit determines, as the target text template, the one candidate text template obtained through screening.
In an optional implementation manner, the number of target named entities in the inquiry information is multiple, the position sequence of each target named entity in the inquiry information is different, the number of placeholders in the target text template is multiple, and the position sequence of each placeholder in the target text template is different; the filling module comprises: the device comprises a first searching unit and a first filling unit, wherein the first searching unit is used for searching a target named entity of which the attribute is matched with the entity attribute corresponding to the placeholder at the 1 st position in the inquiry information for the placeholder at the 1 st position in the position sequence in the target text template and the target named entity which is not filled in the placeholder at the inquiry information, and the first filling unit is used for writing the searched target named entity in the placeholder Fu Zhongtian at the 1 st position; the second searching unit is used for searching a target named entity which has the attribute matched with the entity attribute corresponding to the placeholder in the nth position in the inquiry information and has the closest distance between the position sequence of the target named entity filled in the placeholder in the inquiry information and the position sequence of the target named entity filled in the placeholder in the nth-1 position in the target text template in the inquiry information for the placeholder in the target text template in the nth position sequence, the second filling unit is used for writing the target named entity with the closest distance in the placeholder 3242 in the nth position Fu Zhongtian, and N is a positive integer greater than 1.
In an optional implementation manner, a plurality of target text segments are generated; the second generation module includes: the second determining unit is used for determining whether at least two text fragments to be merged exist in the target text fragments, wherein the at least two text fragments to be merged are provided with reference named entities, the semantics of the contents of the text fragments to be merged, except the reference named entities, are the same, and the reference named entities correspond to the same entity attribute but are named entities with different contents; the merging unit is used for merging at least two text segments to be merged into one merged text segment under the condition that at least two text segments to be merged exist; and the generating unit is used for generating a medical record text according to the text segments except for the at least two text segments to be combined in the target text segments and the combined text segments.
In the application, when a medical record text of a patient needs to be generated according to keywords of a patient condition, the medical record text of the patient can be generated according to the keywords of the patient condition by means of a text template, for example, inquiry information can be obtained, and the inquiry information includes at least one target named entity of the patient related to the patient condition and target entity attributes of the target named entities; screening at least one target text template from the generated text templates according to the inquiry information, wherein the text templates are used for generating text fragments related to medical record texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of each target named entity; filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template; and generating medical record text of the patient according to the at least one target text segment.
Through this application, on the one hand, can be based on the automatic medical record text that generates the patient of text template, so can not need the manual case history text that writes the patient of medical staff, thereby can not be made by medical staff's typing skill or level, and because the speed that generates patient's medical record text based on text template is often higher than the manual speed of writing patient's medical record text of medical staff, so, not only can improve the speed that obtains patient's medical record text, can also liberate medical staff's labour, so, can improve the efficiency that obtains patient's medical record text, and, can reduce the degree that influences medical staff's normal work. On the other hand, the text template has no intelligence and divergence, the expressions in the text template are controllable, for example, the expressions in the text template do not change spontaneously after the setting is successful, the texts, the placeholders and the relative position sequence between the texts and the placeholders in the text template do not change spontaneously after the setting is successful, and the expressions in the text template can be set as the expressions according with the filling mode of the medical record texts according to the actual situation, so that the possibility that redundant information exists in the generated medical record texts of the patients can be reduced, and the related contents of part of keywords missing in the generated medical record texts of the patients can be avoided.
The present application further provides a non-transitory, readable storage medium, where one or more modules (programs) are stored, and when the one or more modules are applied to a device, the device may execute instructions (instructions) of method steps in this application.
Embodiments of the present application provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform a method as described in one or more of the above embodiments. In the embodiment of the application, the electronic device comprises a server, a gateway, a sub-device and the like, wherein the sub-device is a device of the internet of things and the like.
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as servers (clusters), terminal devices, such as IoT devices, and the like, using any suitable hardware, firmware, software, or any combination thereof, for a desired configuration.
Fig. 11 schematically illustrates an example apparatus 1300 that can be used to implement various embodiments in the present application. For one embodiment, fig. 11 illustrates an example apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, memory 1306 coupled to the control module 1304, non-volatile memory (NVM)/storage 1308 coupled to the control module 1304, one or more input/output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304. Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can be a server device such as a gateway in the embodiments of the present application.
In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and one or more processors 1302, which in combination with the one or more computer-readable media, are configured to execute instructions 1314 to implement modules to perform actions in this disclosure.
For one embodiment, control module 1304 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 1302 and/or any suitable device or component in communication with control module 1304. The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and/or a firmware module. Memory 1306 may be used, for example, to load and store data and/or instructions 1314 for device 1300. For one embodiment, memory 1306 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 1306 may include a double data rate four synchronous dynamic random access memory (DDR 4 SDRAM). For one embodiment, control module 1304 may include one or more input/output controllers to provide an interface to NVM/storage 1308 and input/output device(s) 1310.
For example, NVM/storage 1308 may be used to store data and/or instructions 1314. NVM/storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives). NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible by the device and need not be part of the device. For example, NVM/storage 1308 may be accessible over a network via input/output device(s) 1310.
Input/output device(s) 1310 may provide an interface for apparatus 1300 to communicate with any other suitable device, input/output device(s) 1310 may include a communications component, a pinyin component, a sensor component, and so forth. The network interface 1312 may provide an interface for the device 1300 to communicate over one or more networks, and the device 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a communication standard-based wireless network, e.g., wiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers (e.g., memory controller modules) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic for one or more controllers of the control module 1304 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic for one or more controller(s) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic of one or more controllers of the control module 1304 to form a system on chip (SoC).
In various embodiments, the apparatus 1300 may be, but is not limited to: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, apparatus 1300 may have more or fewer components and/or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and speakers.
An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform a method as one or more of the present applications.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable information processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable information processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal that comprises the element.
The method and the device for acquiring the text template and the method and the device for generating the medical record text are introduced in detail, specific examples are applied to explain the principle and the implementation mode of the application, and the description of the embodiments is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A method for obtaining a text template, the method comprising:
acquiring a history text segment in an existing real history medical record text, wherein the history text segment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity;
identifying the historical named entities in the historical text segment, and determining historical entity attributes of the historical named entities;
and replacing the historical named entities in the historical text fragments by using the placeholders corresponding to the historical entity attributes to obtain the text templates corresponding to the historical text fragments.
2. The method of claim 1, wherein the generated text template is plural;
the method further comprises the following steps:
determining at least two text templates with the same semantics as a text template group in the plurality of text templates;
de-duplicating at least two text templates of the set of text templates to leave one text template of the at least two text templates of the set of text templates.
3. The method according to claim 1, wherein the obtaining of the historical text segment in the existing real historical medical record text comprises:
acquiring a plurality of original text segments in the historical medical record text;
determining at least two original text fragments with the same semantic meaning in the plurality of original text fragments as a text fragment group;
de-repeating at least two original text segments in the set of text segments to leave one original text segment in the at least two original text segments in the set of text segments;
and determining the original text segments reserved in each text segment group as the historical text segments.
4. A method for generating medical record text, the method comprising:
acquiring inquiry information, wherein the inquiry information comprises at least one target named entity related to the disease condition of the patient and target entity attributes of all the target named entities;
screening at least one target text template from the generated text templates according to the inquiry information, wherein the text template is used for generating text fragments related to medical history texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities;
the generated text template comprises a text template corresponding to a history text fragment in an existing real history medical record text, wherein the history text fragment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity, the text template is obtained by replacing the history named entity in the history text fragment with a placeholder corresponding to a history entity attribute of the history named entity in the history text fragment, and the placeholder corresponding to the history entity attribute is used for filling the named entity of the history entity attribute;
filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template;
generating a medical record text of the patient according to at least one target text segment.
5. The method of claim 4, wherein the screening at least one target text template from the generated text templates according to the inquiry information comprises:
screening a target text template in which the entity attribute corresponding to the placeholder included in the generated text template is a subset of the target entity attribute in the inquiry information;
if the inquiry information also has the remaining target entity attributes except the entity attributes corresponding to the placeholders in the screened target text templates, screening one target text template of which the entity attribute corresponding to the placeholder is the subset of the remaining target entity attributes in the text templates which are not screened as the target text templates in the generated text templates, and so on until the entity attributes of each target entity in the inquiry information are respectively matched with the entity attribute corresponding to one placeholder in one screened target text template.
6. The method of claim 5, wherein the filtering, in the generated text template, the entity attributes corresponding to the placeholders included in the target text template that are a subset of the target entity attributes in the inquiry information comprises:
determining the entity attributes corresponding to the included placeholders as the text templates of the subsets of the target entity attributes in the inquiry information as candidate text templates;
determining the candidate text template as the target text template under the condition that the candidate text template is one; or,
and under the condition that the candidate text templates are multiple, screening one candidate text template with the largest intersection between the entity attribute corresponding to the placeholder and the target entity attribute in the inquiry information from the multiple candidate text templates, and determining the screened candidate text template as the target text template.
7. The method of claim 4, wherein the interrogation information comprises a plurality of target named entities, the position sequence of each target named entity in the interrogation information is different, the position sequence of each placeholder in the target text template is different, and the position sequence of each placeholder in the target text template is different;
the step of filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template includes:
for the placeholder with the position sequence of the 1 st place in the target text template, in the target named entities which are not filled in the placeholder in the inquiry information, searching the target named entities with the target entity attributes matched with the entity attributes corresponding to the placeholder of the 1 st place, and writing the searched target named entities in the placeholder Fu Zhongtian of the 1 st place;
for the placeholder with the Nth place in the position sequence in the target text template, in the target named entities which are not filled with the placeholder in the inquiry information, searching the target named entity with the closest distance between the target entity attribute matched with the entity attribute corresponding to the placeholder with the Nth place and the position sequence of the target named entity filled with the placeholder with the Nth-1 place in the inquiry information, and writing the target named entity with the closest distance in the placeholder with the Nth place Fu Zhongtian, wherein N is a positive integer greater than 1.
8. The method of claim 4, wherein the generated target text segment is plural;
generating a medical record text of the patient according to at least one target text segment, comprising:
determining whether at least two text fragments to be merged exist in the target text fragments, wherein the at least two text fragments to be merged are provided with reference named entities, the semantics of the contents of the text fragments to be merged, except the reference named entities, are the same, and the reference named entities correspond to the same entity attribute but are named entities with different contents;
combining at least two text segments to be combined into one combined text segment under the condition that at least two text segments to be combined exist;
and generating the medical record text according to the text segments except for the at least two text segments to be merged in the plurality of target text segments and the merged text segments.
9. An apparatus for obtaining a text template, the apparatus comprising:
the medical record management system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring historical text segments in existing real historical medical record texts, and the historical text segments comprise historical named entities related to disease conditions and historical non-named entities except the historical named entities;
the identification module is used for identifying the historical named entities in the historical text segment and determining the historical entity attributes of the historical named entities;
and the first generation module is used for replacing the historical named entity in the historical text fragment with the placeholder corresponding to the historical entity attribute to obtain the text template corresponding to the historical text fragment.
10. An apparatus for generating medical history text, the apparatus comprising:
a second obtaining module, configured to obtain inquiry information, where the inquiry information includes at least one target named entity of the patient related to the disease condition and target entity attributes of the target named entities;
the screening module is used for screening at least one target text template from the generated text templates according to the inquiry information, the text template is used for generating text fragments related to medical record texts, and the entity attributes corresponding to the placeholders in the at least one target text template comprise the target entity attributes of all target named entities;
the generated text template comprises a text template corresponding to a history text fragment in an existing real history medical record text, wherein the history text fragment comprises a history named entity related to a disease condition and a history non-named entity except the history named entity, the text template is obtained by replacing the history named entity in the history text fragment with a placeholder corresponding to a history entity attribute of the history named entity in the history text fragment, and the placeholder corresponding to the history entity attribute is used for filling the named entity of the history entity attribute;
the filling module is used for filling each target named entity in each place holder Fu Zhongfen in at least one target text template according to the entity attribute corresponding to each place holder in at least one target text template and the target entity attribute of each target named entity to obtain at least one target text fragment corresponding to at least one target text template;
and the second generation module is used for generating the medical record text of the patient according to the at least one target text segment.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN202211154825.XA 2022-09-20 2022-09-20 Method and device for acquiring text template and method and device for generating medical record text Pending CN115510835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211154825.XA CN115510835A (en) 2022-09-20 2022-09-20 Method and device for acquiring text template and method and device for generating medical record text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211154825.XA CN115510835A (en) 2022-09-20 2022-09-20 Method and device for acquiring text template and method and device for generating medical record text

Publications (1)

Publication Number Publication Date
CN115510835A true CN115510835A (en) 2022-12-23

Family

ID=84506723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211154825.XA Pending CN115510835A (en) 2022-09-20 2022-09-20 Method and device for acquiring text template and method and device for generating medical record text

Country Status (1)

Country Link
CN (1) CN115510835A (en)

Similar Documents

Publication Publication Date Title
US11030517B2 (en) Summary obtaining method, apparatus, and device, and computer-readable storage medium
CN109564575B (en) Classifying images using machine learning models
CN109086199B (en) Method, terminal and storage medium for automatically generating test script
US20230352043A1 (en) Systems And Methods For Machine-Generated Avatars
US11055560B2 (en) Unsupervised domain adaptation from generic forms for new OCR forms
CN106610931B (en) Topic name extraction method and device
EP2763055B1 (en) A telecommunication method and mobile telecommunication device for providing data to a mobile application
US9218411B2 (en) Incremental dynamic document index generation
JP2023509405A (en) Translation method, device, electronic device and computer program
CN111143551A (en) Text preprocessing method, classification method, device and equipment
CN109960815A (en) A kind of creation method and system of nerve machine translation NMT model
US20210365487A1 (en) Word Library Management Method and Apparatus for input Method
US11822589B2 (en) Method and system for performing summarization of text
WO2021139242A1 (en) Presentation file generation method, apparatus, and device and storage medium
CN114420125A (en) Audio processing method, device, electronic equipment and medium
CN111563399B (en) Method and device for obtaining structured information of electronic medical record
CN115510835A (en) Method and device for acquiring text template and method and device for generating medical record text
CN112948580B (en) Text classification method and system
CN114861640A (en) Text abstract model training method and device
CN114676272A (en) Information processing method, device and equipment of multimedia resource and storage medium
CN113223017A (en) Training method of target segmentation model, target segmentation method and device
Cao et al. AWESOME: GPU Memory-constrained Long Document Summarization using Memory Mechanism and Global Salient Content
CN111126052B (en) Function point generation method, device, electronic equipment and computer readable storage medium
CN111625579A (en) Information processing method, device and system
CN116304029B (en) Deep learning model distillation method and system using knowledge isomerism

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