Announcement

Collapse

Mirth Connect 4.3.0 Released!

Mirth Connect 4.3.0 is now available as an appliance update and on our GitHub page.

This is a major release containing new features like adding new functionality to the Mirth Connect Setup Wizard, adding the ability for resource and channel-specific classloaders to load child-first or parent-first, and added a default implementation of the getObjectsForSwaggerExamples() method in the ServicePlugin class. This release also contains enhancements for the Mirth Connect Administrator Launcher, the Mirth Connect Docker images, and several bug fixes and security improvements.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Need help in creating the filter logic for the interface in Mirth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help in creating the filter logic for the interface in Mirth

    Hello All,

    I have created the channel(LAB to Spring) and build the transformer but i am not able to create the filter logic, can someone help me in creating the same(refer the R1828 LAB Change Control forSpringCharts 100813.docx document and inside that document need to check the step3 that is for filter logic).


    attaching the channel that i created and also the change control document in which the specification/question is written related to filter logic(need to check the step 3).

    below is the step that i am referring to
    1. Message Filtering (Selection Criteria) (8/26/12)
      1. Uses ‘spcht_npi.dat’ file with five arguments following the provider ID. The arguments are,
        1. LAB interface for all messages except those where MSH-3.1 equals “MEDITECH PTH”.
        2. LAB interface for messages where MSH-3.1 equals “MEDITECH PTH”.
        3. RAD interface.
        4. DR interface.
        5. Practice ID.
          1. If the OBR-16 provider has a qualifying default practice ID then use that value to value MSH-6 otherwise,
          2. Check OBR-28 for a provider with a qualifying practice ID and if found then use that value to value MSH-6 otherwise,
          3. All iterations of OBR-16 and OBR-28 need to be evaluated and processed accordingly. (9/26/13)
          4. Evaluate MSH-8 for a qualifying practice ID and if found then move it to MSH-6 otherwise,
          5. Suppress the message.
      2. The possible values for arguments 1 – 4 are any combination of ‘IOE’ with any one of the letters having to match the PV1-2 value in order to accept the message.
      3. The following Practice IDs qualify for Springcharts, followed by their sftp access.
        1. KPC (Practice id)
          1. Additional message filtering for this practice. (10/8/13)
            1. Suppress message if any OBR-25 within the message equals “A”.
          2. host:
          3. username:

    Can someone please help me in this as i am not able to create the filter logic.


    Thanks
    Sarthak Goel
    Attached Files
    Last edited by SARTHAK21; 03-17-2023, 08:12 AM.

  • #2
    This looks like data scraped from one of those requirement emails. You might want to edit your post and deidentify the PHI fields.
    HL7v2.7 Certified Control Specialist!

    Comment


    • #3
      I am not able to understand what is wrong in email/file, can you please ellaborate on that so that i can make the changes in that.

      Comment


      • #4
        The wrong thing is that your post has real names of entities in it (eg. the doctor name), which is a violation of PHI rules. Edit your post and deidentify them.

        This is the general rule of this forum.
        Last edited by siddharth; 01-16-2023, 06:08 AM.
        HL7v2.7 Certified Control Specialist!

        Comment


        • #5
          Well, not a lawyer here, but "something that is generally available with an internet search" (and I don't mean a search of compromised data), isn't really PII or PHI. For example my name and DOB and address are "generally" available via lots of people finder sites.

          PHI is protected health information - a doctor name is not that
          PII is personal identifiable information - a doctor name is not that. (for that matter their NPI is not PII either).

          However, I would agree as a business owner that you should likely keep in confidence client names.
          Diridium Technologies, Inc.
          https://diridium.com

          Comment


          • #6
            Yes.
            HL7v2.7 Certified Control Specialist!

            Comment


            • #7
              Hello All,

              I have made the changes could someone help in creating the filter logic now.

              Comment


              • #8
                This is what i created for this filter logic please check and suggest me:

                var OBR_OrderProv = msg['OBR'][0]['OBR.16']['OBR.16.1'].toString()||msg['OBR']['OBR.16']['OBR.16.1'].toString(); // capturing the value of ordering provider in OBR
                var ORC_OrderProv = msg['ORC'][0]['ORC.12']['ORC.12.1'].toString()||msg['ORC']['ORC.12']['ORC.12.1'].toString(); //capturing the value of ordering provider in ORC
                var AttendMD = msg['PV1']['PV1.7']['PV1.7.2'].toString(); //attending doctor
                var ReferMD = msg['PV1']['PV1.8']['PV1.8.2'].toString(); //referring doctor
                var ConsultMD = msg['PV1']['PV1.9']['PV1.9.2'].toString(); //consulting doctor
                var AdmitMD = msg['PV1']['PV1.17']['PV1.17.1'].toString(); //admitting doctor
                var Module = msg['MSH']['MSH.3']['MSH.3.1'].toString(); //sending application
                var Provider, PTH, LAB, Interface, InterfaceID;
                var accepted = false;


                //array of Mds in message
                var MdList = [OBR_OrderProv]; // converting to list of the order provider value stared in the OBR_OrderProv variable

                if(msg['ORC'].length > 0)
                {
                if(msg['ORC']['ORC.12']['ORC.12.1'].toString() != "")
                {
                //needed in case no ORC segment exists
                MdList.push(msg['ORC']['ORC.12']['ORC.12.1'].toString());
                }
                }


                //iterating thru the copies to in message an pushing them to array list of MDs
                for each (obr in msg.OBR) //applying for loop if their are multiple iteration of the OBR in the hl7 message and also storing the each iteration in the temporary variable i.e the obr variable
                {
                if(obr['OBR.28']['OBR.28.1'].toString() != "") //checking if result copies in the OBR segment is not null
                {
                for each (obr28 in obr['OBR.28']) //applying the for loop for the multiple iteration of the OBR segment and storing the value of result copies in OBR segment to obr28 variable
                {
                if (obr28['OBR.28.1'].toString() != "") // checking if result copies is not null
                {
                MdList.push(obr28['OBR.28.1'].toString()); //pushing the value of obr 28 i.e. result copie in to the md list
                }
                }
                }
                }

                //creating a distinct list of Mds based on the Mds in MDList for query
                var DistinctMdList = []; //intialising the empty list
                for each (var dr in MdList)
                {
                if(DistinctMdList.indexOf(dr) == -1 && dr != "")
                {
                //logger.debug(dr + " distinct");
                DistinctMdList.push(dr);
                }
                }

                //patient class for I, E, O
                var patientType = msg['PV1']['PV1.2']['PV1.2.1'].toString();

                for each(var i in DistinctMdList)
                {
                //logger.info(i.toString());
                var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sql server://CC-SQL2/ProviderInterface','DEV-MIRTH-INT','[email protected]');
                var query = "SELECT Provider, PTH, LAB, Interface, InterfaceID FROM [ProviderInterface].[dbo].[Provider] WHERE Interface = 'SC' AND Provider = '" + i.toString().replace(/\'/g,"''") + "'AND InterfaceID = 'KPC'";
                var results = dbConn.executeCachedQuery(query);
                while(results.next())
                {
                var Provider = results.getString('Provider');
                var LAB = results.getString('LAB');
                var PTH = results.getString('PTH');
                var Interface = results.getString('Interface');
                var InterfaceID = results.getString('InterfaceID');

                if(InterfaceID == 'KPC')
                {
                if (Module.toString() != 'MEDITECH PTH')
                {
                if (LAB.indexOf(patientType) > -1)
                {
                accepted = true;
                }
                }
                for each(obr in msg.OBR)
                {
                if(obr['OBR']['OBR.25']['OBR.25.1']=='A')
                {
                delete msg['OBR']
                }
                }
                if (Module.toString() == 'MEDITECH PTH')
                {
                if (PTH.indexOf(patientType) > -1)
                {
                accepted = true;
                }
                }
                }
                }
                dbConn.close();
                }
                return accepted;​
                Last edited by SARTHAK21; 03-17-2023, 08:20 AM.

                Comment


                • #9
                  SARTHAK21 this reads like a work order. You are asking someone to read the required specifications and write (and now review) the code you wrote that has minimal code comments. In my opinion, it's asking a lot. I would urge you or your employer to hire a consultant if you are struggling with the task, which now appears nearly three months old.
                  Last edited by pacmano; 03-18-2023, 10:14 AM.
                  Diridium Technologies, Inc.
                  https://diridium.com

                  Comment

                  Working...
                  X