Qvera: Getting rid of quotes from a CSV file

When creating a .csv file in Qvera, the message has double quote text delimiters by default.  If you are seeding your message from a SQL query for example, the values will be surrounded by double qotes.


You can reformat the message by saving the message to a temporary variable, and reformatting it using createCSVMessage to put it back as follows:

var currentMessage = message.getNode('/');
message = qie.createCSVMessage(false, '"', ',', 'UTF-8', true);
message.setNode('/', currentMessage);

MU Activity Log

ADD_MUACTIVITY_LOG() is another undocumented symbol that can come in handy. At Blackbird, we use this when we want to record that a handout has been printed. It would be natural to store it in an OBS, but because the CQR reporting system looks in the activity log to see whether or not to count these events, it is best to record them there.

The function signature looks like this:
{ADD_MUACTIVITY_LOG(<ID>,<user>,<handout name or path>)}

{ADD_MUACTIVITY_LOG(12,USER.LOGINNAME,"Handouts\BBS\Weight Reduction Diet")}

Below is a list of acceptable TypeIDs

Getting a List of All Users

The MEL function to get lists of users takes, as a parameter, a list of locations of care.  However, what if you are writing code where you want all the users and don’t know what locations are in the system where the code will be running?

The answer is that you can get the root location and pass that into the function.

{GET_USER_LIST(find('AllLocation', 'ABBREVNAME', 'LOCID', 0),"","Delimited",true)}

Note! the last parameter above is undocumented. It filters out the roles for each user in the result list.

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")}

HTML | MEL dll registration

Occasionally, installing CPS or EMR will result in a key ActiveX control not being correctly registered on the workstation. This generally manifests itself with the Blackbird Framework appearing to have no content in the HTML window.

Usually, this can be fixed with a one-time command line procedure.

Recipe to register DLL for Single User Training:

  1. First run cmd as administrator
  2. Then cd into the Centrcity client folder:
  3. Identify the name of the DLL to be registered. The name should end with .if.dll
    CPS and EMR typically have different file names to be registered.
  4. Register the control using regsvr32
    c:\windows\syswow64\regsvr32 ge.emr.cps.msg.if.dll
  5. reboot and try again.

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;


In case you haven’t noticed, the CPS and EMR demo systems have pretty easy default passwords. Oddly, if an account gets locked or the password expires, there isn’t an easy way to get a password less than 6 characters into the user management system.

You don’t have to be able to decode the passwords in the DoctorFacility table to set the password of a user. The following statement will set hwinston’s password to ‘asdf’

update DoctorFacility set LoginAttempts = 0, password = 'ZjBlNGMyZjc2YzU4OTE2ZWMyNThmMjQ2ODUxYmVhMDkxZDE0ZDQyNDdhMmZjM2UxODY5NDQ2MWIxODE2ZTEzYg==' 
where LoginUser = 'hwinston'