Copy of Snippet "ultrasound report"

ultrasound report can calculate ega by lmp and by crl in mm.

1st Trimester Ultrasound Report

Patient Name: {formtext: name=Patient Name}
Date of Exam: {formdate: MM/DD/YYYY}
LMP: {formdate: MM/DD/YYYY; name=date} {formtext: name=shifting; default=00} 
EDD by lmp: {time: MM/DD/YYYY; at={=date}; pattern=MM/DD/YYYY; shift={=shifting}280D}
Indication: {formtext: name=Indications; default=Routine Pregnancy}
Technique: Transabdominal ultrasound

  1. Gestational sac: Observed within the endometrial cavity, measuring {formtext: name=gestational sac size}.
  2. Yolk sac: Present and identified.
  3. Embryo: Visualized with cardiac activity. FHR is noted to be {formtext: name=FHR; default=\ bpm. Utilizing M-Mode}. Crown-rump length (CRL) estimated at {formtext: name=crl} corresponding to {weeks=5.2876 + ((0.1584 * crl) - (0.0007 * crl^2))} {=weeksform} week gestation with EDD of {time: MM/DD/YYYY; at={=date}; pattern=MM/DD/YYYY; shift={=daysto}D}
  4. Ovaries: {formtext: name=Ovaries; default=Not well seen}
  5. Uterus: {formtext: name=Uterus:\ ; default=Normal anteverted position and shape. No uterine masses or fluid collections observed.}
Intrauterine pregnancy confirmed. Estimated gestational age {=weeksform} weeks.
No structural abnormalities detected.
Next recommended ultrasound at 18-20 weeks or as indicated.
Performed by : Dr. Adam McCall MD 

{note}{daysto=280-({=weeksform}*7); format=}{=daysto}
{ans=((40.447+(1.125 * crl)-(.0058 * crl^2))/7)} {=ans} 
{weeksform=(({=ans}-(floor(ans)))*7)/10+(floor(ans))-0.05; format=,.2f} {=weeksform}{endnote}