Locations of Care

An interesting problem came up this week.  We encountered a situation where the we needed a document’s location abbreviation instead of the full name.

Centricity supports several expressions that retrieve the locations, but not all methods include the abbreviation:

  2. DOCUMENT.LOCOFCARE (undocumented)

To get the abbreviation for the document’s location, this expression appears to work well with a single call:


DOCUMENT.LOCOFCARE actually returns the LOCID for the document’s location of care. This allows find to use the location abbreviation using the table’s key.

Upgrading to CPS to 12.2 or EMR 9.10

When upgrading your Centricity platform, the Blackbird Framework will require a couple of changes.  For those of you who invoke the framework with the standard Blackbird-provided form or quicktext macros, the update will be very easy.
  1. First, you will need to install an updated clinical kit in your Centricity Environment.
    It is located here: https://blackbirdsolutions.com/?p=650
  2. Second: If you have custom quicktext macros or custom buttons on custom forms, the URLs will need to be changed for those calls to SHOW_HTML_FORM()

For reference, here is a screen-shot of the standard Blackbird-provided form:

For those who are invoking the Blackbird framework from your own customized buttons, below are some examples of the differences in the URL format. Effectively, what we have done is removed the reference to the redirect form on the JBoss server.

Only deploy these changes at the time of the upgrade:
Navigate to the summary view (default invocation)
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html","Blackbird Clinical Framework")}
NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/all","Blackbird Content Framework")}
Navigate to specific clinical list views in the patient chart
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=problems","Blackbird Clinical Framework")}
NEW:{show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/problems","Blackbird Content Framework")}
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=medications","Blackbird Clinical Framework")}
NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/medications","Blackbird Content Framework")}
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=allergies","Blackbird Clinical Framework")}
NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/allergies","Blackbird Content Framework")}
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=directives","Blackbird Clinical Framework")}
NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/directives","Blackbird Content Framework")}
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=orders","Blackbird Clinical Framework")}
NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/orders","Blackbird Content Framework")}
Navigate directly to the problem search dialog
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?navigateTo=addProblemDialog","Blackbird Clinical Framework")} NEW:{show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/problems?addProblem=true","Blackbird Content Framework")}
Navigate directly to a search for a specific problem string
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?searchTerm=asthma","Blackbird Clinical Framework")} NEW: {show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/problems?addProblem=true&searchTerm=asthma","Blackbird Content Framework")}
OLD: {show_html_form("//localserver/EncounterForms/BBS_EFS/BBS_redirect.html?searchTerm=sinusitis, acute","Blackbird Clinical Framework")}
NEW:{show_html_form("http://content.blackbirdsolutions.com/bbs_efs#/lists/problems?addProblem=true&searchTerm=sinusitis, acute","Blackbird Content Framework")}

Converting between dates and IDs in CPS/EMR

Occasionally, you need to retrieve date fields that don’t look like dates. The most common example in CPS is the clinicaldate field in the document table.

There are formulae for converting between these IDs and their corresponding dates.

Here is an example query that shows how to retrieve the clinicaldate as a real date as well as showing how to convert the DB_CREATE_DATE to an ID format.

dbo.Convert_ID_to_date() and dbo.Convert_Date_to_ID()

SELECT ClinicalDate, dbo.Convert_ID_to_date(clinicaldate) theDate,
DB_CREATE_DATE, dbo.Convert_Date_to_ID(DB_CREATE_DATE) theID
FROM document
WHERE PID = 1225794115001060;

Encounter form tabs all mixed up?

Occasionally after a long time running the EMR or CPS and many, many imports of encounter forms, something happens where errors begin to occur during the process of importing encounter forms.

When bringing up forms that show these errors on import, the tabs may be out of synch. Sometimes, tabs appear form other forms and sometimes they are just out of order.

The solution is a bit of a trick and has to do with resynching the id generation for form components:

Begin Tran
declare @maxfid varchar(10)
select @maxfid = dbo.maxfid()
update dbo.uniqueid set fid = @maxfid where FID <> @maxfid