Re: Fwd: Win32::OLE merge rtf files - table structure missing

2022-06-15 Thread perl kamal
Hi Mike,
Gratitude for coming forward to refine the solution.

Please find the attached file which is considered as the source file where
I am trying to extract the 2D measurements data and format those results in
a table and would like to keep them inside the "comments:" section at the
bottom of the file.But the table is being updated at the end of the
document. Either we can remove the comments section or paste the table
inside the comments section.
Also I feel the table is not formatted well while updating.
Please suggest,thanks.
 source_file.RTF



On Thu, Jun 16, 2022 at 6:34 AM Mike  wrote:

>
> Thank you.  I received a small file: "source.rtf" and a
> larger 1.9 MB file: "source.RTF".
>
> "source.RTF" has a table and graphic graphs - 2 pages total.
> "source.rtf" is just 2 pages of ASCII text, with an ASCII table:
>
> ┌┬───┬───┬─┬
> │ Fetal_Biometry │ Diameter(cms) │ Growth(%) │ Gestational_Age │
> ├┼───┼───┼─┼
> │BPD │2.44cm │35.57% │14w1d│
> ├┼───┼───┼─┼
> │HCD │9.08cm │20.90% │14w1d│
> └┴───┴───┴─┴
>
>
> I can serve up those files on my website if anybody else comes
> along and wants to see them.
>
> I gather the comments section at the bottom of "source.rtf"
> is this part:
>
>
> -
> Limitations of Obstetrics ultrasound scanning :
> -
> *Although a structural screening scan is undertaken, detection of
> structural anomalies will never be 100%. Detection rates vary and may be
> reduced by factors like maternal obesity, abdominal scars, gestation age,
> inappropriate fetal position and reduced amniotic fluid volume. Even in the
> best of hands, a small percentage of fetal anomalies will remain
> undetected. Internationally accepted detection rate of major abnormalities
> is around 70%. As this is a level I obstetric scan center. To the extent
> visualized no gross sonographically congenital anomalies could be detected
> in the present study and fetal position. However not all anomalies could be
> rule out. To rule out cardiac anomalies fetal echo is suggested. Sometimes
> fetal parts could not be seen in advanced stage of pregnancy and due to
> poor or inadequate acoustic window. Sometimes not all four limbs can be
> clearly visualized due fetal position and acoustic window. This has been
> clearly explained to the patient.
>
>
>
> So what is the problem?  It sounds to me like you have
> everything completed that you want to do.
>
>
> Mike
>
>
>
> On 6/14/22 23:00, perl kamal wrote:
>
> Hi Mike,
> Greetings!!!
>
> Please find the attached source.rtf file.
> I have been trying to parse the rtf file and extract a few clinical
> measurements data and update that information in a formatted way in the
> comments sections which is at the bottom of the file.
>
> The script what I have been developed so far ,
>
>1. Parses the rtf file, writing the raw content into a temp file.
>2. Extracting the required data into a  temp file1.
>3. Formatting the required data ( table structure) into a temp file2
>4. Merges the formatted data from temp2 into the source rtf file at
>the end(expectation is to add at the comments section which is at the
>bottom of the file)
>
> Please let me know if you have any questions or clarifications.
> Your comments will be much appreciated and thankful .
>
>
> Regards,
> Kamal.
>
>
>
>
>


Re: Fwd: Win32::OLE merge rtf files - table structure missing

2022-06-15 Thread Mike


Thank you.  I received a small file: "source.rtf" and a
larger 1.9 MB file: "source.RTF".

"source.RTF" has a table and graphic graphs - 2 pages total.
"source.rtf" is just 2 pages of ASCII text, with an ASCII table:

┌┬───┬───┬─┬
│ Fetal_Biometry │ Diameter(cms) │ Growth(%) │ Gestational_Age │
├┼───┼───┼─┼
│BPD │2.44cm │35.57% │14w1d│
├┼───┼───┼─┼
│HCD │9.08cm │20.90% │14w1d│
└┴───┴───┴─┴


I can serve up those files on my website if anybody else comes
along and wants to see them.

I gather the comments section at the bottom of "source.rtf"
is this part:


-
Limitations of Obstetrics ultrasound scanning :
-
*Although a structural screening scan is undertaken, detection of 
structural anomalies will never be 100%. Detection rates vary and may be 
reduced by factors like maternal obesity, abdominal scars, gestation 
age, inappropriate fetal position and reduced amniotic fluid volume. 
Even in the best of hands, a small percentage of fetal anomalies will 
remain undetected. Internationally accepted detection rate of major 
abnormalities is around 70%. As this is a level I obstetric scan center. 
To the extent visualized no gross sonographically congenital anomalies 
could be detected in the present study and fetal position. However not 
all anomalies could be rule out. To rule out cardiac anomalies fetal 
echo is suggested. Sometimes fetal parts could not be seen in advanced 
stage of pregnancy and due to poor or inadequate acoustic window. 
Sometimes not all four limbs can be clearly visualized due fetal 
position and acoustic window. This has been clearly explained to the 
patient.




So what is the problem?  It sounds to me like you have
everything completed that you want to do.


Mike



On 6/14/22 23:00, perl kamal wrote:

Hi Mike,
Greetings!!!

Please find the attached source.rtf file.
I have been trying to parse the rtf file and extract a few clinical 
measurements data and update that information in a formatted way in 
the comments sections which is at the bottom of the file.


The script what I have been developed so far ,

 1. Parses the rtf file, writing the raw content into a temp file.
 2. Extracting the required data into a  temp file1.
 3. Formatting the required data ( table structure) into a temp file2
 4. Merges the formatted data from temp2 into the source rtf file at
the end(expectation is to add at the comments section which is at
the bottom of the file)

Please let me know if you have any questions or clarifications.
Your comments will be much appreciated and thankful .


Regards,
Kamal.