We currently use the prenatal letter CCC to send to the hospital. Our OB provider wants to see certain labs that are done the initial visit and later done at 36 weeks. The prenatal letter only brings back the last lab date and results from the last lab done. How do I create a data field that would show results for both the lab done at the initial visit and the lab done at 36 weeks. For example, Chlamydia is done at the initial visit and then at 36 weeks.
We have been struggling with the same issue!! I have not had any success!! We ended up having to give "read access only" to L & D staff at the hospital so that they could actually view the specific patient OB history. I would also be very interested in any and all recommendations.
You need to look at Help for the LIST_OBS data symbol. This will return a list of all the values for a particular obs term. You can put the result in an array and loop through it to find the values you want to show.
Is this similar to what you are talking about? If so, this does give a good clean printout. BUT, the providers want their Antepartum Record to look exactly like the ACOG form. 🙁
OB Lab Flowsheet
{labs = GET_FLOWSHEET_VALUES("Enterprise\OB Lab Results")
tody = str(._todaysdate)
if labs "" then
lablist = getfield(labs, "\n", "")
sz = size(lablist)
list = ""
for i = 1, i 0 then
dtloop = 0
dtptr = 1
while (dtloop = 0) and (dtptr + 11 <= labsize)
do
dtbegin = match( lab, dtptr,"/") -2
dt = sub(lab, dtbegin, 10)
if sub(lab, dtbegin + 10, 1) = ")" then dtloop = 1 endif
dtptr = dtbegin + 3
endwhile
dur = durationdays(dt, tody)
if (dur < 365) and (dtloop = 1) then
list = list + lablist[i] + "\n\r"
endif
endif
endfor
if list "" then list else "No lab results." endif
else
"No lab results."
endif}
OB Lab Flowsheet
HGB: 10 (11/02/2015)
HCT: 11 (11/02/2015)
GBS: negative (11/02/2015)
RPR: negative (11/02/2015)
GC DNA: negative (11/02/2015)
GC Culture: negative (11/02/2015)
CHLAMYDIA DNA: negative (11/02/2015)
CHLAMYDIA CULTURE: negative (11/02/2015)
HGB: 20 (09/15/2015)
HCT: 21 (09/15/2015)
GTT 1 HR: 115 (09/15/2015)
GTT 2 HR: 118 (09/15/2015)
GTT 3 HR: 120 (09/15/2015)
GTT 1 HR 50g: 110 (09/15/2015)
RHOGAM INJECTION: given (11/25/2015)
BLOOD TYPE: O- (03/01/2016)
HGB: 10 (03/01/2016)
HCT: 12 (03/01/2016)
HGB: 11 (04/01/2016)
HCT: 9 (04/01/2016)
PAP: Outside Facility (06/24/2016)
OK, I have the following quicktext MEL which gives me the ten most recent lab results for LDL. Try it out as is, and then you can experiment with another OBS, and finally perhaps adjust to only show the last couple results.
{local sA1, a1, a2=0, a3="", s1="", i=0, imax=0, j=1
sA1 = getfield(LIST_OBS("LDL","signed","list","valuedate"),")",HRET)
if size(sA1)<=10 then imax = size(sA1) else imax = 10 endif
s1=""
for i=1,i<imax,i=i+1 do
a1 = getfield(str(sA1[i])," ","")
a1[2] = sub(a1[2],2)
s1 = s1 + a1[2] + ", " + a1[1] + HRET
endfor
s1}
This would be really hard to do automatically because not all initial OB labs or prenatal records are done at the same gestational age. Identifying the initial OB values in multiple back-to-back pregnancies would be even more difficult.
One possibility would be to identify the particular labs you want to capture at the initial OB visit and select different OBS terms to store those values. Then you could do an append to the desired visit or lab result document and use a quicktext or a function in a form to copy those values from current document obs terms to the desired spot. Would OBSNOW work like that in an append?