HamotIntern
MIS
I have a real challenge on my hands. The hospital I work at has a program called CareVue. It has an AllBase database that we have successfully linked to Access. CareVue has many flaws. The one that I am attempting to deal with now is when a nurse or a doctor enters a note; CareVue chops it into 70 character chunks and makes a new record for each chunk. Therefore, in the database, you have multiple records with identical information except for the value_ column and a column that numbers the chunks so that you can put them back together. What we want to do is concatenate them back together into one long string of text using a query. We cannot change what CareVue does and so our only option is to deal with the output it gives us. I have attached the SQL code that I have so far.
SELECT systpe_freenote.notetime, systpe_freenote.notetitle, systpe_dbcodeconfig_set.longlabel, systpe_user_.namelast+' '+systpe_user_.namefirst+' '+systpe_user_.proftitle AS EmpName, systpe_user_.employeeno, systpe_cfgpatients.name_, systpe_cfgpatients.medrecnum, systpe_string60_set.elemid, systpe_string60_set.value_
FROM systpe_cfgpatients INNER JOIN (systpe_user_ RIGHT JOIN ((systpe_dbcodeconfig_set INNER JOIN (systpe_freenote LEFT JOIN systpe_string60_set ON (systpe_freenote.cid = systpe_string60_set.cid) AND (systpe_freenote.oid = systpe_string60_set.oid) AND (systpe_freenote.gprid = systpe_string60_set.gprid)) ON (systpe_dbcodeconfig_set.oid = systpe_freenote.notetype_cid) AND (systpe_dbcodeconfig_set.elemid = systpe_freenote.notetype)) LEFT JOIN systpe_notecfg ON systpe_freenote.notetitlecfg_cid = systpe_notecfg.oid) ON systpe_user_.oid = systpe_freenote.userid) ON systpe_cfgpatients.gprid = systpe_freenote.gprid
WHERE (((systpe_freenote.notetime)=#5/1/2005 18:45:0#))
ORDER BY systpe_freenote.notetime, systpe_string60_set.elemid;
SELECT systpe_freenote.notetime, systpe_freenote.notetitle, systpe_dbcodeconfig_set.longlabel, systpe_user_.namelast+' '+systpe_user_.namefirst+' '+systpe_user_.proftitle AS EmpName, systpe_user_.employeeno, systpe_cfgpatients.name_, systpe_cfgpatients.medrecnum, systpe_string60_set.elemid, systpe_string60_set.value_
FROM systpe_cfgpatients INNER JOIN (systpe_user_ RIGHT JOIN ((systpe_dbcodeconfig_set INNER JOIN (systpe_freenote LEFT JOIN systpe_string60_set ON (systpe_freenote.cid = systpe_string60_set.cid) AND (systpe_freenote.oid = systpe_string60_set.oid) AND (systpe_freenote.gprid = systpe_string60_set.gprid)) ON (systpe_dbcodeconfig_set.oid = systpe_freenote.notetype_cid) AND (systpe_dbcodeconfig_set.elemid = systpe_freenote.notetype)) LEFT JOIN systpe_notecfg ON systpe_freenote.notetitlecfg_cid = systpe_notecfg.oid) ON systpe_user_.oid = systpe_freenote.userid) ON systpe_cfgpatients.gprid = systpe_freenote.gprid
WHERE (((systpe_freenote.notetime)=#5/1/2005 18:45:0#))
ORDER BY systpe_freenote.notetime, systpe_string60_set.elemid;