Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Facilities
FacilityIdOrganizationIdNameTimezoneNFCEnabledNFCSelfModificationEnabledBarCodeEnabled
ACME-PHACME

 Pearl Harbor

US/Hawaii

truefalsefalse

...

SurveyTemplates
SurveyIdName
1New Line Report
2Line Maintenance
3Infection Report
4Breast Milk Report
5Patient Demographics
6Patient Discharge
7Patient Open Lines
8Form Open Lines
9Admission Questions
10Patient Final Discharge
11AUDIT
12MDQ

7. Organization's Alerts

7.1 SurveyAgent

Remember that Alerts are generated by the SurveyAgent. For this scenario we are going to have 2 rules generating alerts: 'New Patient Admission" and "Milk Importance Not Discussed".

...

Once we have the rules and the change-set we need to define a new sub-session for ACME in applicationContext.xml file:

 

 

Code Block
languagexml
linenumberstrue
<bean id="ACME" class="org.drools.mas.core.DroolsAgentConfiguration$SubSessionDescriptor">
    <constructor-arg value="subsession-acme"/>
    <constructor-arg value="ACME-change-set.xml"/>
    <constructor-arg value="${agent.node}"/>
    <constructor-arg>
        <map>
            <entry key="organizationId" value="ACME"/>
        </map>
    </constructor-arg>
</bean>
...
<bean id="${agent.name}-configuration" class="org.drools.mas.core.DroolsAgentConfiguration">
    <property name="agentId" value="${agent.name}"/>
    <property name="changeset" value="agent_changeset.xml" />
    <!-- by default the mindNodeLocation is local --> 
    <property name="mindNodeLocation" value="${agent.node}"/>
    <property name="subSessions">
        <list>
            ...
            <ref local="${agent.name}-unc"/>
        </list>
    </property>
</bean>

...

The last step is to add the routing statement in agent_cbr.drl:

 

Code Block
languagejava
linenumberstrue
rule "Mapping"
when
then
    ...
    insert( new SessionMapping("ACME","subsession-acme") );
    RulesLoggerHelper.debug(logger, drools, "Subsession mapping created for 'ACME');
    ... 
end

7.2 Alerts Configuration

AlertConfiguration
IdNameDescriptionAlertKeyWorkspaceIdSendNotification
1  New Patient AdmissionPH-NurseryTrue
2  Milk Importance Not DiscussedPH-NurseryTrue
3  New Patient AdmissionPH-NicuTrue
4  Milk Importance Not DiscussedPH-NicuTrue
AlertConfigurationUserRecipient
IdAlertConfigurationIdUserId
1 1 ACME-U1
2 3 ACME-U1
AlertConfigurationRoleRecipient
IdAlertConfigurationIdRoleId
1 2 2
2 4 2