How Can You Clear HL7 Assignments Using A Query

I have several thousand assignments under Open Tasks for several different interfaces. The Multi-Select option in the report is only capable of choosing 500 at any given time while taking several minutes to delete. Is there a way to delete all of the Open Tasks at once?


Comments

  • This can be completed by running a delete query against the entity assignment database table for each HL7 Interface. In the Decisions UI, please navigate to [Designer Project Folder} > Other > Query Editor by choosing the three dots on the right-hand side. Here, you will run the following queries:


    Confirm the number of assignments within the Interface:

    select count(*) from entity_assignment 
    where entity_name like '%[Interface Name]%'
    and deleted = 'False'
    

    Update the aforementioned assignments to delete:

    update entity_assignment
    set deleted = 'True'
    where entity_name like '%[Interface Name]%'
    and deleted = 'False'
    

    Please ensure you replace [Interface Name] with that of your actual interface.

    As a precaution, we always recommend performing a database backup prior to running any delete queries against your database.

Sign In or Register to comment.