Using the new FH/SH CCC forms, family history data is stored in a new table in CPS as opposed to in an observation term. GE has provided the following data symbol "MEL_LIST_FHX_AFTER" that pulls the data from that table but it looks HORRIBLE and the ability to make it less horrible is very limited within the confines of the arguments of the data symbol. I am trying to use a data display in VFE to display the data from this new FH table in a more pleasing way so that our providers can more easily review and interpret this information. I found the following code in the default system History and the output of the data in the History view is pretty nice. I just can't figure out how to make this work in VFE in the data display. Any help would be greatly appreciated. Thanks so much! Wes
{global FHX_PROVIDER global FHX_LAST_UPDATED}{fn ccc_hview_fhx(){
local HV_FHX_list="", HV_HV_tmp_txt="", HV_HV_tmp_lst_str="", str_date="", temp_day="", last_day="", i
HV_FHX_list = getfield(str(MEL_LIST_FHX("delim")),"|","")
if str(HV_FHX_list)<>"" then
for i=1, i<= size(HV_FHX_list), i=i+1 do
HV_tmp_lst_str = getfield(str(HV_FHX_list[i]),"^","")
str_date = getfield(str(HV_tmp_lst_str[7])," ","")
if i==1 then
if i==size(HV_FHX_list) then
HV_tmp_txt = if HV_tmp_lst_str[5]<>"Relative" then HV_tmp_lst_str[5] + " - Has " else "" endif + HV_tmp_lst_str[3] + /*if HV_tmp_lst_str[6]<>"" then " (" + HV_tmp_lst_str[6] + ") " else "" endif +*/ if HV_tmp_lst_str[11]=="" then "" else " - " + HV_tmp_lst_str[11] endif + " - Entered On: " + str_date[1]
else
HV_tmp_txt = HV_tmp_lst_str[5] + " - Has " + HV_tmp_lst_str[3] + /*if HV_tmp_lst_str[6]<>"" then " (" + HV_tmp_lst_str[6] + ") " else "" endif +*/ if HV_tmp_lst_str[11]=="" then "" else " - " + HV_tmp_lst_str[11] endif + " - Entered On: " + str_date[1] + "\r\n" + "\r\n"
endif
else
if i==size(HV_FHX_list) then
HV_tmp_txt = HV_tmp_txt + HV_tmp_lst_str[5] + " - Has " + HV_tmp_lst_str[3] + /*if HV_tmp_lst_str[6]<>"" then " (" + HV_tmp_lst_str[6] + ") " else "" endif +*/ if HV_tmp_lst_str[11]=="" then "" else " - " + HV_tmp_lst_str[11] endif + " - Entered On: " + str_date[1]
else
HV_tmp_txt = HV_tmp_txt + HV_tmp_lst_str[5] + " - Has " + HV_tmp_lst_str[3] + /*if HV_tmp_lst_str[6]<>"" then " (" + HV_tmp_lst_str[6] + ") " else "" endif +*/ if HV_tmp_lst_str[11]=="" then "" else " - " + HV_tmp_lst_str[11] endif + " - Entered On: " + str_date[1] + "\r\n" + "\r\n"
endif
endif
temp_day = DURATIONDAYS(str_date[1],str(_TODAYSDATE))
if i==1 then last_date=temp_day endif
if temp_day <= last_date then
FHX_PROVIDER = HV_tmp_lst_str[8]
FHX_LAST_UPDATED=str_date[1]
last_date=temp_day endif
endfor
return HV_tmp_txt
else
return ""
endif
}}
Family History
|
{ccc_hview_fhx()}
{if str(ccc_hview_fhx())<>"" then fmt('Last updated by ' + FHX_PROVIDER + ' on ' + FHX_LAST_UPDATED,"I") else "" endif}
{if str(ccc_hview_fhx())<>"" then fmt("General Comments:","b,1") else "" endif}
{LAST_SIGNED_OBS_VALUE('Family Hx')}
|
Posted : September 22, 2014 6:04 am