Has anyone come up with a solution for OB forms to clear their values for subsequent pregnancies. The issue we have is when a patient comes back for 2nd or 3rd pregnancies, all the information from a previous pregnancy pulls in. Because of this, some information is being carried through a visit that is incorrect. Any ideas on how to clear this?
Thanks!
Melissa
mw4 said:
Has anyone come up with a solution for OB forms to clear their values for subsequent pregnancies. The issue we have is when a patient comes back for 2nd or 3rd pregnancies, all the information from a previous pregnancy pulls in. Because of this, some information is being carried through a visit that is incorrect. Any ideas on how to clear this?
Thanks!
Melissa
darling, emr have OBS field for or up to 10 pregnancies, If form development was correct, you should not have any problem with this field. and i Doubt you will find some female who had more than 10 pregnancy.
In my case i created this form which our OB gyn hardly use all the 5 slot i allocated for pregnancy information, all this information is saved into the obs term
I have a form similar to the one you posted. That form works great! My problems are the forms with Genetic history, EDC/EDD calculations or OB Lab tests. Those forms have terms that I need to carry through an entire pregnancy (OBSPREV) but once I have a second pregnancy, the information may change. Since the information might not be gathered all at the first visit, when it pulls forward we can't be sure if it is from this pregnancy or a previous pregnancy. I hope that explanation makes sense. What I need is a Clear OBS function that will help me put in blanks on all the obs listed for that form or that visit, so we can start over for a subsequent pregnancy.
Melissa
When we pull in the obs we check the date against the LMP (Last Menstrual Period), so we are only looking at obs during the current pregnancy.
Bob
rgibbs said:
When we pull in the obs we check the date against the LMP (Last Menstrual Period), so we are only looking at obs during the current pregnancy.
Bob
I am using this same method. For example, I have a tab that displays (read-only) the patient's prenatal lab results. For values that always be relevant, such as blood type, I use OBSANY() to pull the value. For all other values, I use a function that checks the date of the obs term. If it is after the most recent LMP, then display the value, else leave it blank. The only problem we have is when the MA leaves the LMP field blank, but that is easily fixed once you notice the problem.
-steve
Can either of you post the formula you are using? That would be great!
Thanks
Melissa
fn afterLMP(obs)
{
daysPast = DURATIONDAYS(OBSANY("LAST MP"),str(LASTOBSDATE(obs)))
IF(daysPast >= 0) Then
return "TRUE"
ELSE
return "FALSE"
ENDIF
}
Then you could call it using something like this:
If (afterLMP("NAMEOFOBSTERM")) Then
OBSANY("NAMEOFOBSTERM")
Else
""
You could also modify the function to return the value of the obsterm rather than "TRUE" or "FALSE". That would save some typing.
-Steve Peterson
Circle of Life Women's Center
Your probably better off using Steve's function. The one we use is more generic and requires you to pass it the obs term, date to compare, and a true/false whether or not you want the date printed with the obs value. Here it is if you're interested:
fnUtilityGetObsAnyAfter(strObsName, strStartDate, bIncludeDate)
{
if (strStartDate <> "") then
if (DURATIONDAYS(LASTOBSDATE(strObsName), strStartDate) > 0) then
return ("")
endif
endif
if (bIncludeDate) then
if (LASTOBSVALUE(strObsName) == "") then
return ("")
endif
return (LASTOBSVALUE(strObsName) + " (" + LASTOBSDATE(strObsName) + ")")
endif
return (LASTOBSVALUE(strObsName))
}
Hello Everyone,
I am looking for some help on clearing past pregnancy forms. I am trying to set this up for my OB providers for repeat pregnancies...but can't understand where I am going wrong. I consider myself fairly decent at MEL...but can't get this right. Can someone help with a dummies version please? Thank you!
Here is the error I am getting:
{If (afterLMP("PREG COMPLIC")) Then
OBSANY("PREG COPLIC")
Else
"" ENDIF ENDIF <-COMPILER ERROR NEARBY: ENDIF KEYWORD was unexpected after ENDIF KEYWORD
you have 2 ENDIF's, only need 1.
Still not working....
{If (afterLMP("PREG COMPLIC")) Then
OBSANY("PREG COPLIC")
Else
"" ENDIF <-FUNCTION DEFINITION IS NOT EXECUTABLE
It can't find the function 'afterLMP'.
afterLMP is not a built in function. You need to make sure you include that i your mel too. You can just copy and past it from my May 8th post of this thread.
-steve
I'm really sorry....I guess I got myself very confused. Where am I setting up the function? In each individual form itself or each obs term? Can someone send me a sample of one of their forms or setup? Thank you....
Rebecca
I've gotten this to work. Thank you for the help.
My only other question is...how would I modify the function to return the obs value?
Thank you in advance.