It's the end of the year and everyone in Japan is on vacation. Corona infection is still a big problem in Japan, and the internal medicine clinic is busy with many patients.
This year I had the great pleasure of meeting Text Blaze.
Now the electronic medical record I use is chrome based, so TB is a big help. I have only been using it for two weeks, but I think I will continue to use it for the rest of my life.
When I use the electronic chart, I make a copy of the patient's previous visit and paste it into the current chart.
For example.
================
#hypertension
#Hypercholesterolemia
#angina pectoris
No complaint of chest symptoms this time
Blood data is good
etc.
≈================
The first three lines with # are the patient's problem list, i.e., how do I write the code to copy the blank lines up to the point where there is a blank line?
#Hypertension
#Hypercholesterolemia
#angina pectoris
I want to extract, copy and paste only the above.
I have used TB's "Website contents text" to copy the previous medical record.
{chart={site: text; selector=ul > :nth-child(2) section > div}}{=chart}
This can be done without any problem.
Then I tried to extract the first 3 lines with #, separated by blank lines, using a regular expression.
{problem_list=splitregex({=chart}, "^\r\n") }
{=problem_list[1]}
This would copy the entire previous chart, and I think the key is to separate them with a blank line. Any help would be appreciated.
Translated with DeepL Translate: The world's most accurate translator (free version)