No announcement yet.

Stripping / adding characters

  • Filter
  • Time
  • Show
Clear All
new posts

  • abrowning
    Re:Stripping / adding characters


    There are a couple of ways to do this. It depends on your set up. I would use this to receive in a javascript mapping...

    var str1 = ([OBR.2.1].substring(0,3)); // e.g. str1= "ECHO"
    var str2 = ([OBR.2.1].substring(6,16)); // e.g. str2= "070904-0001"
    var desired_result = str1.concat(str2);
    return desired_result;

    add a little for sending back...

    var str1 = ([OBR.2.1].substring(0,3)); // e.g. str1= "ECHO"
    var str2 = ([OBR.2.1].substring(4,14)); // e.g. str2= "070904-0001"
    var desired_result = str1.concat("20",str2);
    return desired_result;

    Might want to try it but I know that worked for me a couple versions ago.

    Leave a comment:

  • arronramsey
    started a topic Stripping / adding characters

    Stripping / adding characters

    Due to a field length issue, I am needing to strip characters from a field (obr.2.1) from messages coming out of a meditech system. When a message comes back to Meditech, i need to add the characters back in.


    OBR.2.1 comes from meditech looking like: ECHO20070904-0001

    I need to strip the century so OBR.2.1 outbound to GE Centricity looks like this: ECHO070904-0001

    When GE Centricity send back a message, i need to add back in the century so OBR.2.1 looks like it did when meditech first sent the message out.

    I know what i need to do as far as setting up the channels; i am not a programmer and have no code experience

    Any help would be greatly appreciated!


    Arron Ramsey